System and method for managing a blockchain cloud service

ABSTRACT

In accordance with an embodiment, described herein is a system and method for implementing a distributed ledger a blockchain cloud service. The blockchain cloud service can include nodes of the distributed ledger and a management console component. The management console component can include a web application running in a script runtime environment, a plurality of backend of APIs for communicating with various nodes of the blockchain cloud service, and a plurality of client APIs configured to be invoked by a client application. The plurality of client APIs uses one or more of the plurality of backend APIs in provisioning the distributed ledger as a blockchain cloud service, and in managing the managing the blockchain cloud service.

CLAIM OF PRIORITY AND CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit of priority to U.S. Provisionalpatent application titled “SYSTEM AND METHOD FOR PROVIDING A BLOCKCHAINCLOUD SERVICE”, Application No. 62/565,999, filed Sep. 29, 2017; and isrelated to U.S. patent application Ser. No. 15/485,532, entitled“MULTI-TENANT IDENTITY AND DATA SECURITY MANAGEMENT CLOUD SERVICE”,filed Apr. 12, 2017 which has subsequently issued on Oct. 3, 2017 asU.S. Pat. No. 9,781,122, each of which applications are hereinincorporated by reference.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

FIELD OF INVENTION

This disclosure relates generally to systems and methods for providingdistributed ledgers. More particularly the disclosure describes systemand methods for managing a distributed ledger implemented as ablockchain cloud service.

BACKGROUND

A distributed ledger may be broadly described as a digital record ofasset ownership. There is no central administrator of the ledger, nor isthere a central data store. Instead, the ledger is replicated acrossmany participating nodes in a computing environment that may begeographically spread across multiple sites, countries, or institutions.A consensus protocol ensures that each node's copy of the ledger isidentical to every other node's copy. As well, the set of copies may beviewed as a single shared ledger. A distributed ledger may be used byasset owners using cryptographic signature technology, for example, todebit their account and credit another's account.

A blockchain is a data structure can be used to implementtamper-resistant distributed ledgers. Multiple nodes follow a commonprotocol in which transactions from clients are packaged into blocks,and nodes use a consensus protocol to agree on the next block. Blockscarry cumulative cryptographic hashes making it difficult to tamper withthe ledger. Each block can have a reference [hash value] to the previousblock in time. In addition, each block can comprise its own hash. Theblockchain can be traversed traverse backwards (e.g., up the chain).

A blockchain can be either a permissionless blockchain or a permissionedblockchain. Anyone can join a permissionless blockchain and have a copyof the distributed ledger. Bitcoin and Ethereum are examples ofpermissionless blockchains. Permissionless blockchains allow anonymousparticipants to maintain the ledgers, while avoiding control by anysingle entity. However, identity, accountability and auditability aredifficult in light of the anonymity. In contrast, permissionedblockchains accept members by invitation, and allow for levels of trustand accountability by allowing explicitly authorized parties to maintainthe ledgers.

The Hyperledger Fabric is an example of a permissioned blockchain. TheHyperledger Fabric, as an enterprise-grade, open-source distributedledger framework and code base, is an implementation of a distributedledger platform for running smart contracts. It leverages containertechnology to host smart contracts called “chaincode” that comprise theapplication logic of the system.

Platform as a Service (PaaS) is a number of cloud services forapplication development, data management, integration, mobile andInternet of Things (10T. As the demand from cloud services grows, itwould be desirable to provide a blockchain a PaaS cloud service. Ablockchain PaaS cloud service can provide a pre-assembled platform forbuilding and running smart contracts and maintaining a tamper-proofdistributed ledger, while reducing the need for third-partyintermediaries. A PaaS blockchain cloud service can also enable thedevelopment of blockchain solutions that leverage other PaaS services.

SUMMARY

In accordance with an embodiment, described herein is a system andmethod for implementing a distributed ledger as a Blockchain CloudService (BCS). The BCS can include a complete set of infrastructureservices and embedded resources: compute, containers, storage, identitymanagement, and event streaming to enable the setup and execution of aproduction-ready blockchain. The BCS can provision an underlyinginfrastructure with the required blockchain network components, arepresentational state transfer (REST) proxy service component, and anmanagement console component, in response to an administrator specifyingone or more parameters.

In accordance with an embodiment, the distributed ledger can be theHyperledger Fabric, an implementation of blockchain technology that isintended as a foundation for developing blockchain applications. TheHyperledger Fabric can provide a modular architecture, and leveragescontainer technology to host smart contracts called “chaincode” thatcomprise the application logic of the system.

In accordance with an embodiment, the BCS can be based on a PaaS manager(e.g., Oracle PaaS Service Manager (PSM) platform), and can run in acompute space (e.g., external compute space) on the PaaS Manager. Thesystem utilizes features of the PSM platform including a containerruntime service environment (e.g., Docker or Oracle ApplicationContainer Cloud Service (ACCS)) Layered using Oracle Identity CloudService (IDCS), Oracle Load Balancer as a Service (LBaaS), Oracle EventHub Cloud Service, and Oracle Cloud Storage. Each customer blockchaincan be provisioned, and can be run as a tenant. The system supportsmultiple blockchains, each provisioned and running as a separate tenantin a multitenant environment.

In accordance with an embodiment, the management console component andthe REST proxy service component can both be network nodes in a BCS.

In accordance with an embodiment, the management console componentfacilitate and automate the provisioning, monitoring and configurationof the BCS. The management console component can include a webapplication running in a script runtime environment, for example,Node.js. The web application can be built on a graphical user interfaceframework and a web framework; and can include a plurality of customfunctions or APIs to communicate with various nodes or services in a BCSinstance. The web application can populate information from the variousnodes or services in the BCS instance into a view object, for display ina console user interface. The management console component can alsoprovide a plurality of functions for an administrator to start, stop andupdate one or more nodes in a BCS instance. A set of management RESTAPIs can be provided by the script runtime environment or can beaccessed by the script runtime environment, to support the samefunctions as provided by the web application.

In accordance with an embodiment, the REST proxy service component (i.e.REST proxy service or REST proxy) within the BCS instance can use aservice development kit (SDK) for the distributed ledger in the BCS tocommunicate with the distributed ledger, and can provide REST APIs foruse by client applications to query through chaincodes, synchronously orasynchronously invoke transactions through the chaincodes, gettransaction statuses, and get BCS proxy versions. The REST proxy servicecomponent can authenticate REST calls, and translate the REST calls intoremote procedural calls, e.g., Google Remote Procedure Calls (gRPC), foruse in interfacing with the distributed ledger. The REST proxy servicecomponent can further provide REST APIs that support the same functionswhich are provided by the BCS management console component, and providea user interface for client applications to consume the BCS instance.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1A illustrates transaction flow in a fabric of a Blockchain cloudservice system in accordance with an embodiment.

FIG. 1B illustrates a Blockchain cloud service system in accordance withan embodiment.

FIG. 1C illustrates a BCS system in accordance with an embodiment.

FIG. 1D illustrates a BCS system in accordance with an embodiment.

FIG. 1E is a flowchart of a method for providing an interface for ablockchain cloud service, in accordance with an embodiment.

FIG. 2 illustrates a gateway for a Blockchain cloud service system inaccordance with an embodiment.

FIG. 3 illustrates a persistence for a Blockchain cloud service systemin accordance with an embodiment.

FIG. 4 illustrates an exemplary deployment of a fabric on BCS.

FIG. 5 illustrates a chaincode architecture, in accordance with anembodiment.

FIG. 6 illustrates a system for providing a management console inaccordance with an embodiment.

FIG. 7A illustrates examples of user interfaces in a BCS console UI inaccordance with an embodiment.

FIG. 7B illustrates examples of user interfaces in a BCS console UI inaccordance with an embodiment.

FIG. 7C illustrates a method for providing a management console inaccordance with an embodiment.

FIG. 8A illustrates a system for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

FIG. 8B illustrates a system for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

FIG. 8C illustrates a method for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

FIG. 9A shows a typical IDCS use case for a single sign-on, inaccordance with an embodiment.

FIG. 9B shows an IDCS use case for fabric Client Authentication, inaccordance with an embodiment.

DETAILED DESCRIPTION

In accordance with an embodiment, described herein is a system andmethod for implementing a distributed ledger as a cloud service. In aparticular embodiment, a permissioned blockchain ledger, e.g., theHyperledger fabric, can be provided as a Blockchain Cloud Service (BCS).

In the following description, the invention will be illustrated, by wayof example and not by way of limitation, in the figures of theaccompanying drawings. References to various embodiments in thisdisclosure are not necessarily to the same embodiment, and suchreferences mean at least one. While specific implementations arediscussed, it is understood that this is provided for illustrativepurposes only. A person skilled in the relevant art will recognize thatother components and configurations may be used without departing fromthe scope and spirit of the invention.

In accordance with an embodiment, in certain instances, numerousspecific details will be set forth to provide a thorough description ofthe invention. However, it will be apparent to those skilled in the artthat the invention may be practiced without these specific details. Inother instances, well-known features have not been described in as muchdetail so as not to obscure the invention.

The present invention is described with the aid of functional buildingblocks illustrating the performance of specified functions andrelationships thereof. The boundaries of these functional buildingblocks have often been arbitrarily defined herein for the convenience ofthe description. Thus functions shown to be performed by the sameelements may in alternative embodiments be performed by differentelements. Functions shown to be performed in separate elements mayinstead be combined into one element. Alternate boundaries can bedefined so long as the specified functions and relationships thereof areappropriately performed. Any such alternate boundaries are thus withinthe scope and spirit of the invention.

Common reference numerals are used to indicate like elements throughoutthe drawings and detailed description; therefore, reference numeralsused in a figure may or may not be referenced in the detaileddescription specific to such figure if the element is describedelsewhere.

Blockchain technology has the potential to dramatically enhanceenterprise business value by enabling near real-time, distributedtransactions across customers' ecosystems and by enabling secure,tamper-proof data sharing. The Hyperledger fabric blockchainincorporates modular architecture, horizontal/cross-industry technologysupport, and support for enterprise needs.

INTRODUCTION

In accordance with an embodiment, a Hyperledger fabric is a platform fordistributed ledger solutions underpinned by a modular architecturedelivering high degrees of confidentiality, resiliency, flexibility andscalability. It is designed to support pluggable implementations ofdifferent components and accommodate the complexity and intricacies thatexist across the economic ecosystem.

In accordance with an embodiment, a Hyperledger fabric delivers anelastic and extensible architecture, distinguishing it from alternativeblockchain solutions.

Blockchain—a Distributed Ledger

In accordance with an embodiment, a blockchain network can comprise adistributed ledger that records all the transactions that take place ona network.

In accordance with an embodiment, a blockchain ledger is often describedas decentralized because it is replicated across many networkparticipants, each of whom collaborate in its maintenance.Decentralization and collaboration are attributes that mirror the waybusinesses exchange goods and services in the real world.

In addition to being decentralized and collaborative, the informationrecorded to a blockchain is append-only, using cryptographic techniquesthat guarantee that once a transaction has been added to the ledger itcannot be modified. This property of immutability makes it simple todetermine the provenance of information because participants can be sureinformation has not been changed after the fact. In this way,blockchains can be thought of as systems of proof.

Blockchain—Smart Contracts

In accordance with an embodiment, in order to support the consistentupdate of information—and to enable certain ledger functions(transacting, querying, etc.)—a blockchain network uses smart contractsto provide controlled access to the ledger.

In accordance with an embodiment, smart contracts are not only a keymechanism for encapsulating information and keeping it simple across thenetwork, they can also be written to allow participants to executecertain aspects of transactions automatically.

In accordance with an embodiment, a smart contract can, for example, bewritten to stipulate the cost of shipping an item that changes dependingon when it arrives. With the terms agreed to by both parties and writtento the ledger, the appropriate funds change hands automatically when theitem is received.

Blockchain—Consensus

In accordance with an embodiment, the process of keeping the ledgertransactions synchronized across the network—to ensure that ledgers onlyupdate when transactions are approved by the appropriate participants,and that when ledgers do update, they update with the same transactionsin the same order—can be referred to as consensus.

In accordance with an embodiment, a blockchain can be thought of as ashared, replicated transaction system which is updated via smartcontracts and kept consistently synchronized through a collaborativeprocess called consensus.

Advantages of Blockchain

In accordance with an embodiment, the currently available transactionalnetworks are versions of networks that have existed since businessrecords have been kept. The members of a business network transact witheach other, but each member maintains separate records of theirtransactions. As well, objects of the transactions can have theirprovenance established each time they are sold to ensure that thebusiness selling an item possesses a chain of title verifying theirownership of it.

In accordance with an embodiment, despite current business networksbeing modernized by computing systems, unified systems for managing theidentity of network participants do not exist, establishing provenanceis laborious as it takes days to clear securities transactions (theworld volume of which is numbered in the many trillions of dollars),contracts must be signed and executed manually, and every database inthe system contains unique information and therefore represents a singlepoint of failure.

Blockchain, in accordance with an embodiment, provides an alternative tomany of the inefficiencies represented by the standard system oftransactions, by providing a standard method for establishing identityon the network, executing transactions, and storing data.

In accordance with an embodiment, in a blockchain network, eachparticipant in it has its own replicated copy of the ledger. In additionto ledger information being shared, the processes which update theledger are also shared. Unlike other systems, where a participant'sprivate programs are used to update their private ledgers, a blockchainsystem has shared programs to update shared ledgers.

In accordance with an embodiment, with the ability to coordinatebusiness networks through a shared ledger, blockchain networks canreduce the time, cost, and risk associated with private information andprocessing while improving trust and visibility.

Hyperledger Fabric

In accordance with an embodiment, Hyperledger fabric, like otherblockchain technologies, has a ledger, uses smart contracts, and is asystem by which participants manage their transactions.

In accordance with an embodiment, where Hyperledger fabric differs fromsome other blockchain systems is that it is private and permissioned.Rather than the “proof of work” some blockchain networks use to verifyidentity (allowing anyone who meets those criteria to join the network),the members of a Hyperledger fabric network enroll through a membershipservices provider.

In accordance with an embodiment, Hyperledger fabric also offers severalpluggable options. Ledger data can be stored in multiple formats,consensus mechanisms can be switched in and out, and different MSPs(Membership Service Providers) are supported.

In accordance with an embodiment, Hyperledger fabric also offers theability to create channels, allowing a group of participants to create aseparate ledger of transactions. This allows for an option for networkswhere some participants might be competitors and not want everytransaction they make—a special price they are offering to someparticipants and not others, for example—known to every participant. Iftwo participants form a channel, then those participants—and noothers—have copies of the ledger for that channel.

Shared Ledger

In accordance with an embodiment, a Hyperledger fabric has a ledgersubsystem comprising two components: the world state and the transactionlog. Each participant has a copy of the ledger to every Hyperledgerfabric network they belong to.

In accordance with an embodiment, the world state component describesthe state of the ledger at a given point in time. It is the database ofthe ledger. The transaction log component records all transactions whichhave resulted in the current value of the world state. It is the updatehistory for the world state. The ledger, then, is a combination of theworld state database and the transaction log history.

In accordance with an embodiment, the shared ledger has a replaceabledata store for the world state. By default, this is a LevelDB key-valuestore database. The transaction log does not need to be pluggable. Itsimply records the before and after values of the ledger database beingused by the blockchain network.

Smart Contracts

In accordance with an embodiment, Hyperledger fabric smart contracts arewritten in chaincode and are invoked by an application external to theblockchain when that application needs to interact with the ledger. Inmost cases chaincode only interacts with the database component of theledger, the world state (querying it, for example), and not thetransaction log.

Consensus

In accordance with an embodiment, transactions are written to the ledgerin the order in which they occur, even though they might be betweendifferent sets of participants within the network. For this to happen,the order of transactions is established and a method for rejecting badtransactions that have been inserted into the ledger in error (ormaliciously) can be put into place.

In accordance with an embodiment, Hyperledger fabric allows a networkentity (e.g., a network user, peer, starter) to select a consensusmechanism that best represents the relationships that exist betweenparticipants. As with privacy, there is a spectrum of needs; fromnetworks that are highly structured in their relationships to those thatare more peer-to-peer.

Chaincode

In accordance with an embodiment, chaincode can comprise softwaredefining an asset or assets, and the transaction instructions formodifying the asset(s)—it is the business logic. Chaincode enforces therules for reading or altering key value pairs or other state databaseinformation. Chaincode functions execute against the ledger currentstate database and are initiated through a transaction proposal.Chaincode execution results in a set of key value writes (write set)that can be submitted to the network and applied to the ledger on allpeers.

Ledger Features

In accordance with an embodiment, a ledger is the sequenced,tamper-resistant record of all state transitions in the fabric. Statetransitions are a result of chaincode invocations (‘transactions’)submitted by participating parties. Each transaction results in a set ofasset key-value pairs that are committed to the ledger as creates,updates, or deletes.

In accordance with an embodiment, the ledger is comprised of ablockchain to store the immutable, sequenced record in blocks, as wellas a state database to maintain current fabric state. There can be oneledger per channel, with each channel comprising a separate ledger oftransactions visible to a particular group of participants. Each peermaintains a copy of the ledger for each channel of which they are amember.

Privacy Through Channels

In accordance with an embodiment, Hyperledger fabric employs animmutable ledger on a per-channel basis, as well as chaincodes that canmanipulate and modify the current state of assets (i.e. update key valuepairs). A ledger exists in the scope of a channel—it can be sharedacross the entire network (assuming every participant is operating onone common channel)—or it can be privatized to only include a specificset of participants.

In accordance with an embodiment, in the latter scenario, suchparticipants can create a separate channel and thereby isolate/segregatetheir transactions and ledger. In order to allow for scenarios that wantto bridge the gap between total transparency and privacy, chaincode canbe installed only on peers that need to access the asset states toperform reads and writes (e.g., if a chaincode is not installed on apeer, it will not be able to properly interface with the ledger). Tofurther obfuscate the data, values within chaincode can be encrypted (inpart or in total) using common cryptographic algorithms such as AES(Advanced Encryption Standard) before appending to the ledger.

Security & Membership Services

In accordance with an embodiment, Hyperledger fabric provides for atransactional network where all participants have known identities.Public Key Infrastructure is used to generate cryptographic certificateswhich are tied to organizations, network components, and end users orclient applications. As a result, data access control can be manipulatedand governed on the broader network and on channel levels. This“permissioned” notion of Hyperledger fabric, coupled with the existenceand capabilities of channels, helps address scenarios where privacy andconfidentiality are paramount concerns.

Consensus

In accordance with an embodiment, in a distributed ledger, consensus canencompass more than simply agreeing upon the order of transactions. Thisdifferentiation is highlighted in Hyperledger fabric through itsfundamental role in the entire transaction flow, from proposal andendorsement, to ordering, validation and commitment. Consensus can bedefined as the full-circle verification of the correctness of a set oftransactions comprising a block.

In accordance with an embodiment, consensus is achieved when the orderand results of a block's transactions have met the explicit policycriteria checks. These checks and balances take place during thelifecycle of a transaction, and include the usage of endorsementpolicies to dictate which specific members must endorse a certaintransaction class, as well as system chaincodes to ensure that thesepolicies are enforced and upheld. Prior to commitment, the peers canemploy these system chaincodes to make sure that enough endorsements arepresent, and that they were derived from the appropriate entities.Moreover, a versioning check can take place during which the currentstate of the ledger is agreed or consented upon, before any blockscontaining transactions are appended to the ledger. This final checkprovides protection against double spend operations and other threatsthat might compromise data integrity, and allows for functions to beexecuted against non-static variables.

In accordance with an embodiment, in addition to the endorsement,validity and versioning checks that take place, there are also ongoingidentity verifications happening in the transaction flow. Access controllists are implemented on hierarchal layers of the network (orderingservice down to channels), and payloads are repeatedly signed, verifiedand authenticated as a transaction proposal passes through the differentarchitectural components. Consensus is not limited to the agreed uponorder of a batch of transactions, but rather, it is a process that isachieved as a byproduct of the ongoing verifications that take placeduring a transaction's flow from proposal to commitment.

Blockchain Cloud Service—Architecture

In accordance with an embodiment, a system, such as a cloud system(e.g., Blockchain Cloud Service (BCS)), can utilized the above describedHyperledger fabric as a starting point. Such a system offers a highlyadvanced and differentiated enterprise-grade distributed ledger cloudplatform that allows for the building of new blockchain-basedapplications and/or the extension of existing SaaS, PaaS, and IaaS andon-premises applications.

In accordance with an embodiment, the system can supportmission-critical enterprise needs such as scalability, security,robustness, integration, and performance to remove barriers to adoptionand support blockchain applications in production. The system allows forusers to deploy, configure, manage and monitor blockchain and reduce thecost for deploying blockchain in enterprises by providing BCS as aPlatform as a Service (PaaS) Cloud solution. The system also acceleratesthe development and integration of blockchain applications with otherplatforms. The system allows SaaS cloud customers to enable theirenterprise processes like Procurement, Payments, Trade Finance,Accounting, HR, CX to securely share data and conduct distributedtransactions with 3rd party applications and external distributed ledgertechnologies using blockchain cloud platform.

In accordance with an embodiment, the system is a cloud service based ona PaaS manager (e.g., Oracle PaaS Service Manager (PSM) platform). Ingeneral, such a system is a managed cloud service that runs in computespace (e.g., external compute space). In embodiments, the systemutilizes features of the PSM platform including a container runtimeservice environment (such as Docker or an Application Container CloudService) Layered using Oracle Identity Cloud Service (IDCS), Oracle LoadBalancer as a Service (LBaaS), Oracle Event Hub Cloud Service, andOracle Cloud Storage. Each customer blockchain can be provisioned, andcan be run as a tenant. The system supports multiple blockchains, eachprovisioned and running as a separate tenant in a multitenantenvironment.

In accordance with an embodiment, accordingly, the system allows forapplications or customer applications to implement a distributed ledgerwith smart contracts as necessary or desirable for the applications.Clients and users of such a system can be internal or external tocloud—blockchain trust—some blockchain networks may comprise componentsoutside the cloud environment (or could be constrained to a particularcloud).

In accordance with an embodiment, such a system can be useful for a widevariety of application functions in particular in multi-partytransactions where trust and identity issues must be resolved. Unlikeother blockchain systems, the provided system service is not anonymous.Indeed, identity and auditability are fundamental and integratedelements. Accordingly BCS finds applications in, for example, capitalmarkets, cross-border transactions, financial services, assettransactions, legal regulatory applications, healthcare records,publishing, logistics, traceability, and anti-counterfeiting.

In accordance with an embodiment, as described above, each party on ablockchain has access to the entire database and its complete history(unless the ledger has been provisioned/privatized to certain parties).No single party controls the data or the information. Every party canalso verify the records of its transaction partners directly, without anintermediary. Communication occurs directly between peers instead ofthrough a central node. Each node stores and forwards information to allother nodes. Once a transaction is entered in the database and theaccounts are updated, the records cannot be altered, because they arelinked to every transaction record that came before them (hence the term“chain”). If a transaction is in error, a new transaction must be usedto reverse the error, and both transactions are then visible toprovisioned users. To add a new valid transaction, participants canagree on its validity via a consensus mechanism. Participants in theblockchain can certify where the asset came from and how the ownershipof the asset has changed over time. A digital signature can be used toauthenticate document and can be placed in Access Control [varied levelof permissions] And Programmability [Executable Business rules].

In accordance with an embodiment, in many multi-party transactions,money is exchanged, when a party receives the assets or services.Typically because of transaction time, one or other party must commitsgoods or money before the other. In some environments, trust issues areresolved by using an intermediary which holds funds in escrow untilcompletion of conditions in the contract. This resolves trust issuesbetween the original parties. However, such a method adds anothercentralized party which must be trusted, increasing complexity, andlikely the cost of the transaction. Use of smart contracts as part ofthe provided system can eliminate the need for intermediary—parties canconduct trusted transactions on the blockchain without having anintermediary.

In accordance with an embodiment, advantages of the provided system,such as BCS, include that the information contained therein isdistributed. Access is controlled and some privacy can be maintainedalthough auditability is available. Moreover, the blockchain ledger isessentially immutable and cannot be repudiated. The ledger comprises ofa list of blocks. Each transaction block contains: Block ID, PreviousHash, Data Hash, Timestamp, Transaction ID List, Actions (1 . . . n),Chaincode ID, Chaincode proposal, Response (r/w set, events, success orfailure), Endorsers. As each block contains the previous hash and itsown hash, the blocks are inherently ordered and immutable onceknown/distributed (note: the hash of a present block is a hash of thehash of the previous block and the other data in the present block,hence linking the blocks in a chain). A consensus can resolvediscrepancies. Compared to a centralized database or intermediary, thereis no need to give undue authority to a centralized authority. Thedistributed nature of the ledger also augments the fundamentalimmutability of the blockchain recording technology in that the use ofdistributed copies—and consensus make it difficult to modify (even wherealgorithmically possible). Thus, given the ordering oftransactions—hacking ledger is nearly impossible if somebody has a copyof the latest block in the chain.

In accordance with some embodiments, as described below, the providedsystem can be based on the Oracle PaaS Service Manager (PSM) platformand is augmented with a management console whichsimplifies/facilitates/automates provisioning, monitoring andconfiguration of fabric based blockchains. Additionally, a REST proxyservice including a unitary REST API is provided to simplify contactbetween applications and the Blockchain fabric. Developers can buildsmart contracts, use the management console to deploy the smartcontracts, and then let the applications invoke the smart contract onthe blockchain either asynchronously (which is the default) orsynchronous (if an immediate response is desired). The REST proxyservice and API provides both synchronous and asynchronous capabilitiesdepending on the needs of the platform.

In accordance with an embodiment, a fabric-CA server can provide amembership service for a fabric. The fabric-CA server can comprise threeparts: authentication for user, authorization for accessing a Blockchain(a group of peers and orders) and a CA server which could delivercertificate to application client, peer and order. fabric-CA can utilizea certificate to implement authentication and authorization. Thecertificate include two types: enroll certificate for authentication andtransaction certificate for authorization. In accordance with anembodiment, an identity service, such as IDCS, can also provideauthentication and authorization.

Hyperledger Fabric

As described above, in an embodiment, the provided system can implementa Hyperledger fabric providing a distributed ledger platform for runningsmart contracts. The fabric leverages container technology to host smartcontracts called “chaincode” that comprise the application logic of thesystem. In alternative embodiments the Block Chain Cloud Serviceimplements alternative distributed ledger platforms including forexample, the “Tendermint” ledger system as described in U.S. patentapplication Ser. No. 15/169,622 (U.S. Publication No. 2017/0236120)entitled “Accountability And Trust In Distributed Ledger Systems”, filedMay 31, 2016, which is incorporated by reference.

In accordance with an embodiment, the distributed ledger protocol of theHyperledger fabric is run by peers. One disadvantage of prior blockchaintechnologies is that all peers are required to record all transactions.This creates substantial I/O and processor overhead and does notconveniently scale to enterprise-grade systems. The Hyperledger fabricdistinguishes between two kinds of peers: A validating peer is a node onthe network responsible for running consensus, validating transactions,and maintaining the ledger. On the other hand, a non-validating peer isa node that functions as a proxy to connect clients (issuingtransactions) to validating peers. A non-validating peer does notexecute transactions but it may verify them. The segregation of peertypes/function improves the scalability of the system.

In accordance with an embodiment, a feature of the Hyperledger ispermissioned blockchain with immediate finality which runs arbitrarysmart contracts called chaincode. The user-defined chaincode smartcontracts are encapsulated in a container and system chaincode runs inthe same process as the peer. Chaincode execution is partitioned fromtransaction ordering, limiting the required levels of trust andverification across node types, and reducing network overhead.

In accordance with an embodiment, channels in the Hyperledger fabricenable multi-lateral transactions with high degrees of privacy andconfidentiality required by competing businesses and regulatedindustries that exchange assets on a common network. The immutable,shared ledger encodes the entire transaction history for each channel,and includes query capability for efficient auditing and disputeresolution. A ledger is provided in the scope of a channel—it can beshared across the entire network (assuming every participant isoperating on one common channel)—or it can be privatized to only includea set of participants.

In accordance with an embodiment, the Hyperledger fabric implementssecurity through support for certificate authorities (CAs) for TLScertificates, enrollment certificates and transaction certificates.Public Key Infrastructure is used to generate cryptographic certificateswhich are tied to organizations, network components, and end users orclient applications. As a result, data access control can be manipulatedand governed on the broader network and on channel levels. This“permissioned” feature of Hyperledger fabric, coupled with the existenceand capabilities of channels, satisfies privacy and confidentialityneeds in multi-party enterprise systems.

In accordance with an embodiment, Hyperledger fabric provides theability to modify assets using chaincode transactions. As describedabove, Chaincode is software defining an asset or assets, and thetransaction instructions for modifying the asset(s).

In accordance with an embodiment, integrated consensus mechanisms have afundamental role in transaction flow in the Hyperledger fabric, fromproposal and endorsement, to ordering, validation and commitment.Consensus is, as described above, a verification of the validity of aset of transactions comprising a block. Consensus is ultimately achievedwhen the order and results of a block's transactions have met theexplicit policy criteria checks.

FIG. 1A illustrates transaction flow in a fabric of a system providing ablockchain service. More specifically, the figure illustrates aBlockchain Cloud Service (BCS) system in accordance with an embodiment.At 1, Client 160 uses fabric SDK 162 to access fabric certificateauthority 170, 172, 174 to enroll. At 1.1 fabric-CA returns anenrollment certificate to the client 160. At 2, Client 160 uses fabricSDK 162 to access Peer container 180 requesting endorsement fromEndorser 182. At 2.1 Endorser 182 returns a signed RWset (read/writeset). At 3, the fabric SDK 162 at the client 160 submits the endorsed TX(transaction) which includes RWset and endorser signatures to theordering service at the ordering container 190. At 4, Orderer 192delivers the TX batch to Committer 184 in peer container 180. TheOrderers are a defined collective of nodes that orders transactions intoa block. The ordering service exists independent of the peer processesand orders transactions on a first-come-first-serve basis for allchannel's on the network. Committer 184 applies changes to ledger 186and World State 188 at 5 and 5.1. The fabric certificate authority 170can be used to validate signatures and authorization for the peercontainer 180, the smart contract container 166 and 168 (smartcontract), and the orderer 192. In addition, the smart contract 168 cancommunicate with the endorser 182.

In an embodiment, the system can utilize a Kafka cluster as an orderingservice. Kafka is a distributed streaming service that supports publishand subscribe semantics. A Kafka cluster runs on a plurality of serversand stores streams of records in categories called topics. Each recordcomprises of a key a value and a timestamp. Kafka can thus be used as anordering service comprising ordering service nodes (OSN-n), and a Kafkacluster. The ordering service client can be connected to multiple OSNs.The OSNs do not communicate with each other directly. These orderingservice nodes (OSNs) (1) do client authentication, (2) allow clients towrite to a chain1 or read from it using a simple interface, and (3) theyalso do transaction filtering and validation for configurationtransactions that either reconfigure an existing chain or create a newone. Messages (records) in Kafka get written to a topic partition. AKafka cluster can have multiple topics, and each topic can have multiplepartitions. Each partition is an ordered, immutable sequence of recordsthat is continually appended to. Once the OSNs have performed clientauthentication and transaction filtering, they can relay the incomingclient transactions belonging to a certain chain to the chain'scorresponding partition. They can then consume that partition and getback an ordered list of transactions that is common across all orderingservice nodes.

In accordance with an embodiment, each peer has the capability to be anendorser and a committer. There is a configuration item (e.g.,CORE_PEER_ENDORSER_ENABLED) which can enable a peer to be an endorser.When a peer joins a channel, this peer becomes a committer of thischannel. When a chaincode is installed on a peer, this peer becomes thecandidate endorser for this chaincode. When a client proposes atransaction, it is the client's choice to select which peers to be theendorsers (from the candidate endorsers).

In accordance with an embodiment, the Ordering mechanism for Ordererdelivering blocks to Peer are as follows. First, a peer (e.g., a leaderpeer) delivers a request for new blocks from Orderer by sending itsversion (the last block number). Next, an Orderer checks Peer's version:a) if it is greater than Orderer, returns an error to Peer, it indicatesthe ledger in Order are lost, and cannot be recovered from EventHub (inthis scenario, Orderer cannot continue work properly); b) if the peer'sversion is less than Orderer, then Orderer retrieves blocks from localledger, either in RAM or local file, and send back to peer; or c) ifthey have the same version, then Orderer blocks until new blocks areavailable. When a new block data cut from EventHub is ready, the Ordererwill put it into local block file or RAM, then deliver thread reads thisblock from ledger and sends it back to peer. The peer gets this block,and commits it to local ledger, and can then broadcast its latestversion to other peers.

BCS System Architecture

FIG. 1B illustrates transaction flow in a fabric of a system providing ablockchain service. More specifically, the figure illustrates aBlockchain Cloud Service (BCS) system in accordance with an embodiment.As shown, the Blockchain cloud service components are provisioned incompute space 120 (e.g., external compute space), for example on theOracle PaaS Service Manager (PSM) platform. Access to the system ismediated by the PSM API 122 and Blockchain REST API 124. ExternalCompute 120 leverages a load balancing as a service LBaaS 126 todistributed incoming transaction across the available appropriateresources.

In accordance with an embodiment, the BCS is an application-containerlayered service built with PSM platform on a container runtime serviceenvironment (such as Docker or an Application Container Cloud Service)128. Each of the BCS entities runs on a separate container. Each of BCSentity is one-to-one correspondence to a container runtime service. TheBlockchain Cloud Service implements features of the Hyperledger fabricdescribed above. Besides the components that construct the basic fabricnetwork, several components are developed to leverage the Hyperledgerfabric into the Blockchain Cloud Service. These components need separatedeployment behaviors and binaries to deploy these components. A CloudStack Manager can be used to empower users to automate the provisioningof all services defined by the blueprint as a single unit that is calleda stack.

In accordance with an embodiment, the BCS provides an implementation ofthe Hyperledger fabric which is an implementation of a distributedledger platform for running smart contracts. The BCS leverages containertechnology to host smart contracts called “chaincode” that comprise theapplication logic of the system.

In accordance with an embodiment, the distributed ledger protocol of thefabric is run by peers. The fabric distinguishes between two kinds ofpeers: A validating peer is a node on the network responsible forrunning consensus, validating transactions, and maintaining the ledger.On the other hand, a non-validating peer is a node that functions as aproxy to connect clients (issuing transactions) to validating peers. Anon-validating peer does not execute transactions but it may verifythem. Some key features of the fabric release include permissionedblockchain with immediate finality which runs arbitrary smart contractscalled chaincode. The user-defined chaincode smart contracts areencapsulated in a container and system chaincode runs in the sameprocess as the peer. The fabric implements a consensus protocol andsecurity through support for certificate authorities (CAs) for TLScertificates, enrollment certificates and transaction certificates.

In accordance with an embodiment, the BCS entities run in layeredcontainer instances with container runtime service 128. The containersare created and/or started by provisioning operations of the PSM. Thefabric-CA Container 130, is the container in which the BCS fabric CA(Certificate and Authority) component is provided. The BCS Peer(Container) 132 is the container in which the BCS peer network entitythat maintains a ledger and runs chaincode containers in order toperform the read/write operations to the ledger component is running.The BCS ordering Container 134 is the container in which the BCS ordererwhich provides the service to order transactions into a blockchain forall of channels is running. The BCS Chaincode Execution Container 139 isa container created and started by the peer entity. In the container,the chaincode execution unit communicates with the parent peer entityand performs encoding of assets and transaction instructions formodifying the assets in the blockchain.

In accordance with an embodiment, the BCS Chaincode Builder Container140 is a container created and started by the peer entity. In thecontainer, the chaincode build environment is installed and deployed,and the chaincode execution unit is built in it. A client side fabricSDK 106 provides functionality for accessing the BCS. The Block ChainCloud Service also leverages Event Hub Cloud Service 150, Cloud StorageService 152, and Identity Service 154. Oracle storage cloud service isused as the storage service for BCS.

In accordance with an embodiment, Docker/Weave 141 are containerservices. Containers provide a way to package software in a format thatcan run isolated on a shared operating system. Unlike VMs, containers donot bundle a full operating system—instead using libraries and settingsrequired to make the software work are needed. This makes for efficient,lightweight, self-contained systems and guarantees that software willalways run the same, regardless of where it's deployed.

In accordance with an embodiment, each BCS instance comprises ofdifferent types of nodes. There can be few (e.g., 0 or more) to multiplepeer nodes in a BCS instance. There can be few (e.g., 0) to multipleorderer nodes in a BCS instance. There are 1 to multiple fabric-CA nodesin a BCS instance, one per VM. BCS Gateway: There can be few (e.g., 0)to multiple BCS gateways in a BCS instance. BCS console is also acomponent of a BCS instance. There is only one BCS console in a BCSinstance.

In accordance with an embodiment, the BCS Management Server (Console)136 is a component of BCS, which provides rich monitor, management, andview functionalities to the BCS stack instance as described in moredetail below. BCS Gateway (REST proxy) 138 is a new component of BCS,and provides a REST API interface to customers/clients and is used toaccess the fabric to perform transactions as described in more detailbelow.

In accordance with an embodiment, on the public access client-side 100,A PSM Console UI 102 allows for management of Platform Service Manager.A BCS Console UI 104 allows for control of the BCS Management Server. Avariety of different client types can access the BCS service includingfabric SDK clients 106, BCS REST Clients 108, and fabric MembershipClients 110.

In accordance with an embodiment, blueprints can be defined for eachtype of container listed of above as an individual service type. TheOracle Cloud Stack Manager uses the blueprints to automate theprovisioning of all of individual service types into a single stackunit. The benefit of defining a service type for each of BCS entity isease of upgrading and maintaining the various running entities. Thecontainer runtime service layered service supports four types ofoperations: CREATE_SERVICE, DELETE_SERVICE, SCALE_SERVICE, andStart/Stop/Restart. These operations can be applied service by service.

In accordance with an embodiment, in the Hyperledger fabric, theordering service component uses the Apache Kafka to provide orderingservice and support for multiple chains in a crash fault tolerantmanner. Accordingly, in the BCS cloud service, the ordering servicecomponent will uses the OEHCS (Oracle Event Hub Cloud Service thatdelivers the power of Kafka as a managed streaming data platform and canbe integrated with the rest of Oracle's cloud.)

FIG. 1C illustrates a BCS system in accordance with an embodiment. Morespecifically, the figure shows a BCS runtime.

In accordance with an embodiment, clients, such as gateway-basedapplications 103 and/or fabric-based applications 105 can communicatewith a container runtime service instance 128, via a network, such asthe internet 107, and via a front end, such as a load balancer LBaaS126, which can comprise CloudGate (discussed below). Incoming calls cancomprise REST communication (shown as the heavier dashed line in thefigure), or, in certain situations, incoming gRPC communication (shownas the lighter dashed line in the figure). Incoming REST communicationcan be directed to a gateway 138 (which can comprise a REST API/RESTProxy), a console 136, or an Agent fabric-CA 130 (as discussed above).The REST communication, now transformed/translated to internal calls(gRPC), can interface with the instance of the blockchainfabric/Hyperledger (including the agent/peers 132, agent/orderers 134,chaincode 142, and chaincode builders 140). Meanwhile, incoming gRPCcommunication can be directly transmitted to, for example, theagent/peers 132, and the agent/orderers 134, to interface with theblockchain/Hyperledger.

In accordance with an embodiment, once transactions within the containerruntime service instance have occurred, the container runtime serviceinstance can then, for example, persist the ledger at the cloud storagevia REST communication, or can communicate with the Event Hub, likewisevia REST communication.

In accordance with an embodiment, while only one container runtimeservice instance is shown in the figure, one of skill in the art wouldreadily understand that there can exist one or multiple containerruntime service instances that the clients (such as gateway-basedapplications 103 and/or fabric-based applications 105) can communicatewith via the described BCS runtime.

FIG. 1D illustrates a BCS system in accordance with an embodiment. Moreparticularly, the figure shows the component cardinality within a BCSsystem, namely ratios of components with respect to each BCS instance.

In accordance with an embodiment, for each BCS instance 100 a: anorderer 101 a can be provided in the ratio of 1:N; a fabric-CAmembership 102 a can be provided in a ratio of 1:N; a BCS REST-Proxy 103a can be provided in the ratio of 1:N; a BCS console 104 a can beprovided in a ratio of 1:1, and a peer container 105 a can be present inthe ratio of 1:N.

In accordance with an embodiment, each peer container can comprise anendorser, which can simulate a transaction, and a committer, which canapplication changes to a ledger, which is also provided at the peercontainer.

In accordance with an embodiment, chaincode 109 a can be provided at aratio of 1:N with respect to the peer container. In addition storage 106a can be provided at a ratio of N:1 with respect to the peer containerand the orderer. As well, Event Hub 107 a can be provided at a ratio ofN:1 with respect to the peer container and the orderer. IDCS 108 a canbe provided at a ratio of N:1 with respect to the fabric-CA membership.

FIG. 1E is a flowchart of a method for providing an interface for ablockchain cloud service, in accordance with an embodiment.

In accordance with an embodiment, at step 175, a method can provide, ata computer comprising at least one processor, at least one instance ancontainer runtime service, and a distributed ledger component in the atleast one instance of the container runtime service, wherein thedistributed ledger is provisioned as a blockchain cloud servicecomprising, the blockchain cloud service comprising a peer container, aordering container, and a chaincode container.

In accordance with an embodiment, at step 176, the method can maintain,by the peer container, a blockchain ledger.

In accordance with an embodiment, at step 177, the method can order, bythe ordering container, transactions within the blockchain ledger.

In accordance with an embodiment, at step 178, the method can encode, bya chaincode execution unit of the chaincode container, assets in theledger.

In accordance with an embodiment, at step 179, the method can configurethe at least one instance of the container runtime service to receive anincoming call from a client application, the incoming call requesting anentry into the blockchain ledger.

Blockchain Cloud Service (BCS) Gateway

In accordance with an embodiment, BCS Gateway (BCSGW) comprises anetwork node using fabric SDK to communicate with fabric network. TheBCS Gateway provides a HTTPS RESTful API to customers on the client sidewhich allows clients/client applications to interact with elements ofthe fabric of the BCS.

FIG. 2 illustrates a gateway for a Blockchain Cloud Service system inaccordance with an embodiment. As shown in FIG. 2, End User 200interacts with an application adapter 202 for authentication andauthorization using HTTPS. The application adapter 202 accesses thePublic Cloud 210 using HTTPS to a LBaaS, such as CloudGate 212 (i.e., aLBaaS). Load balancing as a service (LBaaS) is performed for incomingtransactions. CloudGate 212 passes transactions to BCS gateway 222 usingHTTPS. BCS gateway provides the interface to BCS fabric 220 in whichcommunication utilizes gRPC remote procedure call protocol.

In accordance with an embodiment, CloudGate 212 is a reverse proxy“access enforcement module” or “policy enforcement point” that securesweb browser and REST API resources using, for example, OAuth2 and OpenIDConnect standards. IDCS uses CloudGate internally to secure its ownadministration UI and REST APIs (referred to as “IDCS Web Tier”). Forother applications, Cloud Gate: OTD is deployed as additional instancesin a semi-supported/interim setup known as Non-IDCS or Standalone.

In accordance with an embodiment, the OAuth/OpenID based authenticationsupports user browser flow (for UI client) which is triggered if theHTTP request contains a “user-agent” header, which means the request isfrom a UI like browser or mobile app. CloudGate prompts the user forcredentials (username/password), verifies the credentials, then createsand returns the OAuth session cookie which can be used by the subsequentHTTP requests from the browser. The OAuth/OpenID based authenticationalso supports Resource Server flow (for programmatic client). This flowis triggered if the HTTP request contains an Authentication “Bearer”token header. CloudGate validates the token for authentication.

In accordance with an embodiment, for HTTP basic authentication, forevery HTTP request, the credentials (username/password) must be includedin the HTTP Authorization “Basic” header. Cloud Gate verifies thecredentials for every HTTP request. This method applies to both UIclient and programmatic client.

In accordance with an embodiment, multitoken flow is a self-adaptivemethod which covers certain HTTP requests. If the HTTP request containsan Authorization “Basic” header, CloudGate performs HTTP basic behavior.If the HTTP request contains an Authorization “Bearer” header, CloudGate behaves the same as the resource server flow.

In an embodiment, the BCS console browser client utilizes the userbrowser flow. In embodiments, for BCS console and gateway programmaticclient, the system can use CloudGate multitoken authentication method.Programmatic clients can invoke BCS REST APIs via HTTP basicauthentication.

In accordance with an embodiment, BCS gateway 222 communicates withpeers 224 which are network entities that maintain a ledger and runchaincode containers in order to perform read/write operations to theledger. Peers are owned and maintained by members. BCS gateway 222 andpeers 224 communicate with orderer(s) 226. Orderers provide orderingservices. The Orderers are a defined collective of nodes that orderstransactions into a block. The ordering service exists independent ofthe peer processes and orders transactions on a first-come-first-servebasis for all channel's on the network. Peers 224 and orderers(s) 226communicate with the fabric certificate authority 228. BCS gateway 222also provides access to BCS Management Server/Console 230.

In accordance with an embodiment, the BCS is deployed on a cloud system,such as Oracle cloud. A gateway can be run in a container runtimeservice container. The gateway is stateless. A gateway can be updated bykilling the old gateway and starting a new gateway. BCS gateway canallow customer queries or invoke fabric chaincode by RESTful protocol.BCS gateway allows client to access the fabric network in Oracle cloudby HTTPS/RESTful service. The BCS Gateway is a network node using fabricSDK to communicate with fabric network. Communication within the fabricuses gRPC as a communication protocol. On the client-side, the BCSgateway provides HTTPS/RESTful API to customer. The REST API allowsclient to invoke functions within the fabric using the fabric SDK.

In accordance with an embodiment, a gateway can be provided in aone-to-one relationship with a fabric user. All gateway users belong toone organization, all gateway users map to one fabric user in onegateway. One gateway configured only one fabric user.

In accordance with an embodiment, IDCS issues gateway certification andgateway user (“App adapter”) certification. These certifications aresigned with organization CA. Gateway and gateway users can deploy withorganization CA, so they could validate each other using HTTPS.

In accordance with an embodiment, each end user access BCSGW through“App adapter”. There are 3-tiers of authentication. End user 200 can beauthenticated by App adapter 202. App adapter 202 can be authenticatedby BCS gateway 222 with client certificate. BCS Gateway canauthenticated by peers 224 and orderer 226 in fabric network 220.

In accordance with an embodiment, one container runs one tomcat server,deploys one BCS Gateway, mapping to one fabric user. Multiple Appadapters could connect to one Gateway.

In accordance with an embodiment, different gateways can be associatedwith different fabric user. End users of App adapters that connect toone gateway can map to one fabric user.

In accordance with an embodiment, BCSGW run in Oracle cloud,configuration is set by BCS console using JSON file. Admin user couldpublish part of peers, channels and chaincodes to Gateway. Admin userstarts Gateway by console. The gateway does not refresh configurationafter boot. Admin user can set endorsers for chaincodes. The policy isopaque to end users, Gateway does not check chaincode policy.

In accordance with an embodiment, BCSGW is started by BCS console. BCSconsole creates BCSGW configuration file and uses the BCSGW package tostart a new gateway. Upon startup, a startup script checks the BCSGWconfiguration file, modifies a configuration file (e.g., a Tomcatconfiguration file) for Tomcat, then starts Tomcat. Tomcat starts athread for BCSGW, the thread read configuration file, for each channel,it can start a channel object, and create connections with order, peers,event hubs. Different channel will have different connection toorder/peer/event hubs. The event hub here is a second port of peer.Gateway connects to this port to get the result of transaction. Tomcatservlet container can listen and wait for client request. For chaincodequery method, BCSGW send the request to all peers of the channel, andonly use the first result. For chaincode invoke method, BCSGW send therequest to all endorsers of the channel, if one of them return success,BCSGW send the transaction to all orderers of the channel.

In accordance with an embodiment, an Asynchronous API is supported. Apeer can open two ports, one port if for event exchange. The gateway canconnect to the event port of peer. Gateway only need connect to oneevent port for one channel. Normal client APIs are synchronous. Atransaction may take a few seconds, client need wait for response. Sendasynchronous events to client is not in V1 plan. Besides synchronoustransaction API, Gateway provide asynchronous transaction API“asyncinvoke”.

In an embodiment, the Asynchronous API can work in this manner. Afterchecking the parameters of client request, Gateway will returntransaction ID to client. The client can be aware that the transactionis started but not finished. Gateway will start a background thread tokeep processing the transaction. The client can track unfinishedtransactions. The gateway can provide “transaction” API for client toquery transaction status using transaction ID.

In accordance with an embodiment, a client login can be supported. TheBCSGW can support HTTPS protocol, and not allow unsecure HTTP access.BCSGW uses certificates to trust app adapter or SALT. The app adaptercan authenticate end users. Tomcat needs set to use HTTPS clientcertificate authentication. The keystore file include BCSGW cert and CAcert to validate the client is provided by BCS console. The BCS gatewayprovides a BCS Rest interface for client access.

Persistence—Storage Cloud

In accordance with an embodiment, Hyperledger fabric has the blocks ofthe ledger being stored in the local file system and other runtime data,like block index, state of the world, history and ledger provider beingstored in LevelDB, which is also stored in the local file system. Incontainer runtime service, the container file system is ephemeral,meaning when the container is stopped and a new container is restartedon a new VM due to some hardware failure—the file system contents may belost. Considering a situation where all containers are lost, then thereis no way to recover ledger. So ledger data must be stored outsidecontainer runtime service containers. Because of this, a persistencesolution is provisioned in the form of an object storage service for useby components of the Hyperledger fabric described above.

In accordance with an embodiment, accordingly in the BCS, thepersistence solution utilizes a Storage Cloud Service. E.g. OracleStorage Cloud Service. The ledger is backed-up to an Object Store.Ledger blocks written to container file system, but also backup toobject storage. Index & World State are recorded using the containerFile System but may be recovered from the Storage Cloud Service if acontainer is restarted. Oracle Storage Cloud is an Infrastructure as aService (IaaS) product, which provides an enterprise-grade, large-scale,object storage solution for files and unstructured data.

FIG. 3 illustrates a persistence for a Blockchain cloud service systemin accordance with an embodiment. As shown in FIG. 3, container runtimeservice instance 300 includes a plurality of containers. Containersinclude, for example ordering containers 302, 304 havingledgers/blockchains 312, 314. The ledgers/blockchains 312 and 314 arebacked up over a REST interface to an Object storage 320. Object storage320 may be, for example a cloud storage service.

In accordance with an embodiment, the object storage is used to persistthe ledger of each orderer. The current mechanism for Orderer deliveringblocks to Peer are as follows. First, a Peer delivers a request for newblocks from Orderer by sending its version (the last block number).next, an Orderer checks Peer's version, a) If it is greater thanOrderer, returns an error to Peer, it indicates the ledger in Order arelost, and cannot be recovered from EventHub. In this scenario, Orderercannot continue work properly. b) If Peer's version is less thanOrderer, then Orderer retrieves blocks from local ledger, either in RAMor local file, and send back to Peer. c) If they have the same version,then Orderer blocks until new blocks are available. When a new blockdata cut from EventHub is ready, the Orderer will put it into localblock file or RAM, then deliver thread reads this block from ledger andsends it back to Peer. Finally, the Peer gets this block, and commits itto local ledger. Next, the latest version of the ledger can be broadcastto other Peers.

In accordance with an embodiment, according to the above process, eitherOrderer or EventHub can have the whole blocks persisted. As describedabove, EventHub has time limited retention. If EventHub can do it, theOrderer can set Ledger type to RAM or file, once Orderer is restartedand ledger is lost, it can replay the records from EventHub and cut thebatch message into block, then can re-construct ledger. If EventHub onlysupports a limited retention period, once Orderer is restarted andledger is lost, it cannot re-construct ledger correctly because thefirst record in EventHub is not the true record in ledger. In thisscenario, Orderer cannot start the old channel because the first blockwith channel information is lost, and version number (the last blocknumber) is not correct as well.

In accordance with an embodiment, then, each orderer can persist eachblock to Oracle Storage, meanwhile save all channel IDs to an object inStorage as well. On Peer, only persist the genesis block because it hasthe channel information. For other block data, Peer can retrieve it fromOrderer once it is lost.

In accordance with an embodiment, container runtime service instance 300can also comprise Peer Containers 306, 308 comprising ledgers 316, 318,and indices 326, 328. There are five types of runtime data generated byPeer: Transaction log (block file); Block file index (LevelDB); Ledgerprovider (LevelDB); State Database (LevelDB or couchdb); History(LevelDB). All transaction data are stored in Transaction log as alinked block in local file, it must be persisted to Oracle Storage Cloudservice. Ledger provider DB keeps all ledger ID and recover status inLevelDB. The ledger ID is the unique id to identify a channel that apeer belongs to. It must be persisted to Oracle Storage Cloud Service.For others, Peer can recover it automatically at runtime, so keep themin local file system.

In accordance with an embodiment, Oracle Storage Cloud Service providesREST API for uploading/downloading file to/from an object. When a newblock is generated, first, it will be written into a local block file asbefore, the difference is one block per file. Next, this block file willbe uploaded to Oracle Storage as an object. If it fails, the changes inlocal file will be rollback, and an error will be returned to caller.

In accordance with an embodiment, for block file index, when Ordererupdates a latest checkpoint, the information can be persisted to OracleStorage first, then update local LevelDB. If the event that theoperation fails, an error can be returned to the caller. Thisinformation will be used for the recovery for block file index. InOracle Storage, each Peer and Orderer has unique container name that'sthe combination of msp id and node id. The object name is name of blockfile prefixed by channel name. For more details, see section NameConvention in Oracle Storage.

In accordance with an embodiment, a save Ledger provider DB to OracleStorage option can be provided. For ledger provider DB, the entireLevelDB can be replicated to Oracle Storage Cloud Service once it isupdated. This file is very small, and the update is not frequent, so theoverhead on the replication can be ignored. When container is restarted,it can be download it from Oracle Storage Cloud Service if exists. IfOrderer is restarted from a new container, it will download channel idfrom a Storage object first, then get latest checkpoint from Storage bychannel id. Next, start recovery block index from the first block tolast block. During this period, the block file will be downloaded one byone. After that, Orderer starts to recover State DB and History DB. IfPeer is restarted from a new container, it will download Ledger ProviderDB first, then it can get all ledger id. Next, get the related genesisblock from Storage by ledger id. Peer starts with the configuration ingenesis block and deliver a quest to Orderer to get other block data.After Peer gets these blocks, it starts to recovery block index, stateand history DB.

In accordance with an embodiment, the local block file acts as a readcache. The query will read data from local first, if it doesn't exist,then download from object storage. Besides ledger, the source codes ofchaincode need to be persisted to Oracle Storage. In current fabric, anencoded source code will be stored on peer after chaincode is installed.Peer will check chaincode container for each Invoke or Instantiate, ifthe container doesn't exist, peer will rebuild it from source code. So,it can be upload it to Oracle Storage for each chaincode installation,and download it when peer is restarted from disk failure.

BCS: SDK Based Configuration File Operations and Post-ProvisionDeployment

In accordance with an embodiment, configuration files and deploymentfunctions deploy, initiate generate, update and get configurations aboutthe applications include peers, orderers, CA servers and chaincode whendeploy or update the applications. These functions reside at both BCSconsole (in Node.js) and fabric containers (peer/orderer/chaincodecontainer). The functions will get/update configurations as requestedfrom UI, and call SDK APIs to activate the configuration changes whenneeded. The component as part of BCS console backend interacts with theBCS console UI, IDCS backend SDK, and all the BCS applications toprovide the SDK for UI operations get/update configurations asrequested. The component also helps to provision the BCS applications.The BCS provision component will deploy the BCS applications into theDocker containers of the VMs created using PSM. This feature willimplement SDK API for BCS console UI and BCS provision components get orupdate BCS applications configurations and deployment inpost-provisioning phase. In the post-provisioning phase, theprovisioning system will deploy BCS applications such as CA server,orderer, peer, under Docker/Swarm. When the VM startup, it will callstartup script to perform post-provisioning and VM initial work.

In accordance with an embodiment, configuration files are provided forfabric components including peers, orderers, fabric CA and BCS Gateway.BCS applications packages, configurations, chaincode store in Customer'sStorage Cloud Service.

In accordance with an embodiment, the provision system should completeall the resources allocation. The resources include VMs, Network, andStorage.

In accordance with an embodiment, the provision system should save allthe resources allocation information to the storage service. Theinformation includes the VM number and their network addresses/accountcredentials, BCS application number in each VM and their type, publicand internal IP. And there should also be enough internal IP addresses(accessible among VMs) for containers.

In accordance with an embodiment, when the BCS provision component hasdone the provision work, the VM startup script will start, then callswarm deploy the container runtime service, and inside the container,the container startup.sh script to perform initiation operation.

In accordance with an embodiment, the BCS console will get theconfigurations from storage service when it starts, and will save theinput of the user operation from UI back to storage service, and thensend restart command to swarm.

In accordance with an embodiment, the security certificates needed canbe saved in IDCS. Alternatively, the security certificates can beretrieved from IDCS.

In accordance with an embodiment, a BCS console backend can communicatewith the BCS applications with swarm.

In accordance with an embodiment, when the BCS container runtime servicestarts up, the BCS application can gather configuration details todecide its application type (peer or chaincode container or other), andthen load the configuration needed.

In accordance with an embodiment, this component updates theconfiguration and provides BCS application startup shell code. The BCSget/update configuration file operation can be split into several parts.First, the BCS console will get configuration from storage when itstarts, and save configuration into storage from BCS console when needupdate (shell and Node.js). When the BCS container runtime servicestarts up, the startup script (in each Docker container) will startfirst then get configuration for its application type and get the appcert from IDCS (shell). When the BCS console UI restarts a BCSapplication, it sends message to the Docker/Swarm to restart theapplication in the container.

In accordance with an embodiment, the BCS console is stateless, and,when started, can gather all the BCS instance configurations andconnects to the BCS applications and monitors them. The configurationswill be obtained from a storage service via backend API. When anyconfigurations change, the BCS console will call backend API to save theconfigurations back to storage service and restart related applications.When the customer changes the configuration items via BCS console UI,the UI will encode the configurations into key/value data, the backendcode will transform it to file and save into the storage service. TheBCS console can monitor, start and stop the BCS applications. The startand stop commands use Docker/Swarm APIs to implement this function.

Deployment of a Fabric Network

In accordance with an embodiment, a fabric network comprises thefollowing entities: peers, clients, ordering service, and a set ofprotocols to facilitate the communications among these entities.Organizations are logical entities or corporations that constitute thestakeholders of a fabric network. A fabric network has multipleparticipating organizations. Member: A legally separate entity that ownsa unique root certificate for the network. Network components such aspeer nodes and application clients will be linked to a member. Eachorganization may have one or more members. One organization cancontribute both orderers and peers, or orderers only, or peers only.

In accordance with an embodiment, a first step in deploying a fabricnetwork is defining the participants. This step is done out-of-the-bandof fabric network. All participating organizations of a fabric networknegotiate and conclude the composition of the network including, forexample, which organization(s) contribute orderer nodes, and whichorganizations contribute peer nodes. Every organization whichcontributes orderer nodes publishes the root certificate for its ordererservers. Every organization which contributes peer nodes publishes theroot certificate for its peer servers. Every organization which hasclients publishes the root certificate for its clients. Clients can beseparated from peers to different members in one organization.

In accordance with an embodiment, as an example, four banks (bank1,bank2, bank3, and bank4) have decided to deploy a Blockchain networkusing an ordering service that would comprise orderer nodes owned bybank1 and bank2. And bank1 is only to contribute orderers in thisnetwork. Each bank is an organization of the fabric network: bank1 has 1member: orderers(root_cert_1); bank2 has 3 members:clients(root_cert_21), peers(root_cert22), orders(root_cert23); bank3has 2 members: clients(root_cert31), peers(root_cert32); bank4 has 2members: clients(root_cert41), peers(root_cert42).

In accordance with an embodiment, after defining the participants,certificates are generated for orderers and peers. Each orderer or peerneeds a (private key, signing certificate) pair to identify itself. Eachmember can configure and start its own fabric CA server with its rootcertificate, and use CLI or SDK to request the CA server to generate the(private key, signing certificate) for each orderer/peer server of thismember. BCS provides a fabric CA server which can provide certificates.However, fabric CA server is not the only approach to generatecertificates. User can use other CA system to do the same. So fabric CAserver is not a mandatory component in a fabric network.

In accordance with an embodiment, after generating certificates for theorderers and peers, a fabric network is bootstrapped by creating thesystem channel. There is exactly one system channel for an orderingservice (so for one fabric network), and it is the first channel to becreated (or more accurately bootstrapped). The system channel definesthe composition of a fabric network:

One Ordering service

-   -   One or more Orderer organizations. Each org's        -   MSP ID        -   Certs    -   Ordering service attributes (e.g. type—solo or Kafka, orderer        addresses, batch size/timeout)    -   Policies (who can create channels, etc.)

One or more Consortiums. Each consortium contains

-   -   One or more peer organizations. Any peer organization which        wants to participate in this fabric network must be defined here        in one of the consortiums. Each org's        -   MSP ID        -   Certs        -   Anchor peers

In accordance with an embodiment, after a fabric network system channelis bootstrapped a genesis block is created for the system channel (firstblock in the chains). The Orderer service administrator generates thegenesis block for the system channel. The genesis block can be generatedeither by tool configtxgen (genesismethod=file), or during ordererstartup (genesismethod=provisional). When generating genesis block usingthe configtxgen tool, a configuration file configtx.yaml can be composedfas the input. This file contains the following information: The rootcertificates of all orderer organizations in the fabric network; Theroot certificates of all peer organizations; Ordering serviceattributes: orderertype, address, batchtimeout, batchsize, kafka;Policies; Channel reader: authenticate & validate channel deliveryrequests; Channel writers: authenticate & validate channel broadcastrequests; Chain creators: evaluate chain creation requests; Admins:authenticate & validate channel reconfiguration requests;

In accordance with an embodiment, the Orderer service administratorstarts an orderer server with configuration file and the genesis block.This creates the system channel using the genesis block. A configurationfile orderer.yaml is needed for starting an Orderer server: Listenaddress/port, ledgertype, etc.; LocalMSP (private key, signingcertificate). Each organization which provides ordering service startsits orderer servers (no genesis block should be specified).

In accordance with an embodiment, each organization which contributespeer nodes prepares a configuration file (defaultlocation/etc/hyperledger/fabric/core.yaml) for each peer to specify:LocalMSP (private key, signing certificate) to identify the peer; andPeer attributes: Listen address/port, bootstrap peers, gossipattributes, etc. And then starts the peer servers.

In accordance with an embodiment, after the orderers and peers arestarted, the channel administrator (who has the privilege to createchannel) uses fabric CLI or SDK to request an orderer to create achannel with the following input: One consortium (must have been definedin the system channel); and one or more Peer orgs in the consortium.Each participating organization uses fabric CLI or SDK to join some ofits peers to the newly created channel.

Example: Deployment of a Fabric Network on BCS

FIG. 4 illustrates an exemplary deployment of a fabric on BCS.

In accordance with an embodiment, more particularly, the figure anddescription describe the steps to deploy a fabric network on BCS. Inthis example, four entities A, B, C, and D want to create and join afabric network. The four entities discuss off-line and decideresponsibilities of the various entities. Each entity creates one ormore BCS instance on OPC.

In accordance with an embodiment, Entity A provides both orderers andpeers. Entity A creates two instances: Orderer_Org1 401 for orderers andPeer_Org1 421 for peers. Entity A is also responsible for creating thefabric network (note: only an orderer can create a fabric network). Theordering service 400 comprises Orderer_Org1 401 and Orderer_Org2 402 aswell as Kafka cluster 410.

In accordance with an embodiment, Entity B provides both orderers andpeers. Entity B creates two instances: Orderer_Org2 402 for orderers andPeer_Org2 422 for peers.

In accordance with an embodiment, Entity C provides only peers. Entity Ccreates instance Peer_Org3 423.

In accordance with an embodiment, Entity D provides only peers. Entity Dcreates instance Peer_Org4 424.

In accordance with an embodiment, the administrator of each BCS instancecollects the CA certificate and admin certificate of the current orgfrom BCS console. The administrator of each peer org identifies theanchor peers of the current org and collects the IP/port of the anchorpeers. The four entities exchange all the collected information witheach other off-line.

In accordance with an embodiment, from the BCS console, theadministrator of Orderer_Org1 creates the fabric network by creating thesystem channel with the following information collected in previousstep: the CA certificate and admin certificate of each org; and theanchor peers of each peer org. The backend work can comprise invoking afabric tool to create genesis block and configuring orderer to createthe system channel using the genesis block.

In accordance with an embodiment, from the BCS console, theadministrator of each peer org joins the fabric network by updating theconfiguration of all peer nodes to add the CA/admin certificates ofother orgs collected, and restarting all the peer nodes.

In accordance with an embodiment, in a system, a method is provided toallow a new org to join an existing fabric network. Furthermore, auser-friendly method can be provided to facilitate the communicationsamong participants in order to create/join fabric network, e.g. to coverthe off-line actions in preliminary to forming the fabric.

Chaincode (Smart Contract) Container

In accordance with an embodiment, and as discussed above chaincode issoftware defining an asset or assets, and the transaction instructionsfor modifying the asset(s). Chaincode enforces the rules for reading oraltering key value pairs or other state database information. Chaincodefunctions execute against the ledger current state database and areinitiated through a transaction proposal. Chaincode execution results ina set of key value writes (write set) that can be submitted to thenetwork and applied to the ledger on all peers.

In accordance with an embodiment, to support the consistent update ofinformation—and to enable a number of ledger functions (transacting,querying, etc.)—a blockchain network uses smart contracts to providecontrolled access to the ledger. Smart contracts can encapsulateinformation, replicate it automatically across the fabric, and they canalso be written to allow participants to execute certain aspects oftransactions automatically.

In accordance with an embodiment, Hyperledger fabric smart contracts arewritten in chaincode and are invoked by an application external to theblockchain when that application needs to interact with the ledger. Inmost cases chaincode only interacts with the database component of theledger, the world state (querying it, for example), and not thetransaction log.

In accordance with an embodiment, Hyperledger fabric utilizes the Dockerengine to build chaincode, deploy it and keep it running. This sectiondescribes the fabric architecture and how it is integrated into acontainer runtime service layered model for BCS.

In accordance with an embodiment, fabric deploys and manages userchaincode as follows: First build the chaincode in an ephemeral CC envcontainer. Second, the chaincode is transferred as source code into thebuilder container, compiled with needed libraries statically linked(“Java build”), then the binary is sent back to the peer. The staticlink allows the actual chaincode container to be as small as possible.Third, build a chaincode image and container and start it. The chaincodecontainer then remains running until the peer is shut down or thechannel terminated. Should the chaincode container crash or be killed,if the image exists it is restarted on the next invocation. The designis to have one chaincode Docker container per peer and channel.Chaincode is explicitly installed on peers. That is: not all peers thatjoin a channel necessarily have chaincode installed.

In accordance with an embodiment, users can deploy a fabric network incontainer runtime service layered containers, which have the ability totransparently distribute components such as peers, orderers andchaincode. Chaincode runtime environment containers (ccenv) will bedynamically started as ACLS containers Chaincode binary will be saved inCloud Storage since local block storage is not considered a reliable wayof recovering. Once built chaincode binaries will be uploaded to CloudStorage for recovery purposes in case of container crash.

In accordance with an embodiment, each chaincode interaction cancorrespond to various functions of chaincode. The only restriction isthat chaincode cannot be invoked or queried until it is instantiated.Additionally, upon any invocation the chaincode container is restartedif it cannot be found running.

FIG. 5 illustrates a chaincode architecture, in accordance with anembodiment. More specifically, the figure illustrates a chaincodearchitecture which allows a client 530 to install chaincode and runtransactions in container runtime service environment 500 according toan embodiment. Step 1, Client 530 installs chaincode source code to aPeer 1, 510. First build the chaincode in an ephemeral CC env container.When a client 530 performs “install”, it will: start a buildercontainer, which will automatically start a builder agent, wait for thebuilder container to finish initializing, send the chaincode source codeto the builder container via peer, (step 2). The builder agent willbuild chaincode (Java build). The chaincode is transferred as sourcecode into the builder container, compiled with needed librariesstatically linked (“Java build”), then the binary is sent back to thepeer. The static link allows the actual chaincode container to be assmall as possible. Once built, the chaincode package (tgz file) will beuploaded to Cloud Storage 560 (step 3). The builder agent will send theCloud Storage location to the peer for later reference (step 4.2).

In accordance with an embodiment, the peer 510 will then start the CCenv as an ACLS (Access Control Lists) container 520, using the PSM RESTAPI. Build a chaincode image and container and start it. The chaincodecontainer then remains running until the peer is shut down or thechannel terminated. The peer 510 will pass the chaincode ID, self IP(for chaincode registration) and Cloud Storage location to ACLScontainer start (step 4.1). The peer will wait for chaincode to start,or time out after a set period. The ccenv will start the chaincode. Uponstartup, the chaincode will register itself with the peer step 4.3). Thechaincode will be ready for invocation in transactions (step 5), whichwill be performed using the connection established at registration time.

In accordance with an embodiment, the builder container 550 comprises asimple REST-type server. The builder container 550 comprises builderagent 553. The builder container 550 starts up and listens for achaincode build request. When the builder container 550 receives a buildrequest, e.g.: POST call with base64 encoded source code as body itbase64 decodes the source code and saves the chaincode source code inlocal filesystem. The builder agent 553 then performs “Java build” onthe source code. If “Java build” is successful, the builder agent 553package binaries and upload to Cloud Storage 560. The builder agent alsoreturns the chaincode location to the peer. If “Java build” fails, theagent returns the error and reason to the peer.

BCS Management Console

In accordance with an embodiment, as described above, each instance of aBCS can include a management console, which can be used to manage andmonitor the BCS instance, including the BCS Gateway, BCS nodes, and BCSchannels.

In accordance with an embodiment, the management console componentfacilitate and automate the provisioning, monitoring and configurationof the BCS. The management console component can include a webapplication running in a script runtime environment, for example,Node.js. The web application can be built on a graphical user interfaceframework and a web framework; and can include a plurality of customfunctions or APIs to communicate with various nodes or services in a BCSinstance. The web application can populate information from the variousnodes or services in the BCS instance into a view object, for display ina console user interface. The management console component can alsoprovide a plurality of functions for an administrator to start, stop andupdate one or more nodes in a BCS instance. A set of management RESTAPIs can be provided by the script runtime environment or can beaccessed by the script runtime environment, to support the samefunctions as provided by the web application.

In accordance with an embodiment, the system can facilitate themonitoring and management of the associated BCS instance through a webinterface provided by the web application, or through a custom RESTclient application written using the set of management REST APIs.

In accordance with an embodiment, the management console can enable aBCS administrator to manage a plurality of components of the BCSinstance, including one or more peer nodes, one or more orderer nodes,one or more fabric-CA nodes, one or more BCS gateway nodes, channels,and one or more chaincodes.

In accordance with an embodiment, managing a BCS component can includeperforming one or more of the following operations: starting thecomponent, stopping the component, adding the component, removing thecomponent, viewing/editing attributes of the component, viewingperformance metrics of the component, and view logs of the component.

FIG. 6 illustrates a system for providing a management console inaccordance with an embodiment.

In accordance with an embodiment, as shown in the figure, a BCSmanagement console 136 can be provided as a component of a BCS instancein the container runtime service 128. The BCS management console can bea web application running in a script runtime environment 605, which canrepresent a runtime environment provided by Node.js.

In accordance with an embodiment, the management console can include aplurality of backend APIs 610, for example, a fabric Node ServiceDevelopment Kit (SDK) 611, a plurality of fabric custom functions/APIs613, and a plurality of container runtime service APIs 615. The SDK,custom functions/APIs and container runtime service APIs can be used tocommunicate with a fabric network 601, which can comprise a distributedstreaming service (e.g., Kafka) 603. The management console can furtherinclude a view object 623 that can contain information that needs to bedisplayed in the BCS console UI 104 or a REST-client 604, or containinformation that needs to be passed from the BCS console UI or theREST-client to the management console. A fabric node SDK 621 can operateto map the information from the fabric network and the information theBCS console UI or the REST-client.

In accordance with an embodiment, the BCS management console can includea plurality of client APIs 622, which can be used by the BCS console UIor the REST-client to provision a BCS cloud service, and manage theprovisioned BCS cloud service. Managing the provisioned BCS cloudservice can include starting and stopping a peer node, an orderer node,a fabric-CA node, and a BCS gateway node; and adding and removing a peernode, an orderer node, and a BCS gateway node.

In accordance with an embodiment, the BCS management console can furtherinclude a GUI framework (e.g., JET) 617 and a web framework (e.g.,Express) 619. The GUI framework can provide a variety of user interface(UI) components and elements that can be used in the management consoleweb application. For example, the UI components and elements can be usedto create forms, collect data, and visualize data. The web framework canbe written in JavaScript and can provide a web application frameworkincluding a robust set of features to develop web and mobileapplications.

FIGS. 7A-7B illustrate examples of user interfaces in a BCS console UIin accordance with an embodiment.

In accordance with an embodiment, as shown in FIG. 7A, a BCS summary 711can be displayed in a dashboard. The summary can include the number oforganizations, the number of peers, the number of orderers, the numberof channels and the number of chaincodes.

In accordance with an embodiment, health information 713 of the BCSinstance can be displayed. The health information can be visuallydisplayed and numerally displayed. The sample UI can also displaytransaction execution 714 and ledges summary 715.

In accordance with an embodiment, FIG. 7B illustrates information forall the nodes in the BCS instance. For example, the sample UI shows atotal of 5 nodes, including 2 peers, 1 order, 1 fabric-CA, and 1 RESTproxy (within a BCS gateway node). For each node, the summary UI 717displays the name of the node 723, the route information of the node725, the type of the node 729, and the status information of the node731. The sample UI include a button 721 for an administrator to addnodes, and one or more dropdown lists 719 to filter the nodes.

Node Management

In accordance with an embodiment, there can be two entities that canmanage a BCS instance using the management console: BCS administratorand BCS user. There is only one BCS administrator account for each BCSinstance. The BCS administrator account can be created when the BCSinstance is created. The BCS administrator can be bundled with thefabric-CA administrator (i.e., all the actions that the BCSadministrator performs from the BCS console or via BCS management RESTAPIs use the fabric-CA administrator identity). There can be more thanone BCS user account, which can be created by BCS administrator byregistering a fabric-CA identity.

In accordance with an embodiment, the nodes in a BCS instance can bedisplayed in one web page. The management console can support two modes.In the first mode, the name, type, access URL, and status of each nodecan be presented as a list. In the second mode, the channels that eachpeer participates in can be presented in diagram.

Further, in accordance with an embodiment, the management console canenable a BCS administrator to start and stop a peer node, an orderernode, a fabric-CA node, and a BCS gateway node; and add and remove apeer node, an orderer node, and a BCS gateway node. A fabric CA nodecannot be added or removed.

In accordance with an embodiment, when adding a node, the BCSadministrator can set the attributes of the node. The newly added nodecan be started automatically as part of the add operation. When a nodeis removed, the node is stopped and removed from the BCS instance.

In accordance with an embodiment, the BCS console UI can list all thechannels that an active peer node participates in, and all thechaincodes that are installed on the active peer node.

In accordance with an embodiment, when managing peer nodes, the BCSadministrator can join an active peer node to an existing channel, andview and edit the attributes of an active orderer node. A BCS user canview some of the attributes of an active peer node.

In accordance with an embodiment, further, snapshot performance metricsfor an active peer node can be displayed in the BCS console UI, such as:memory usage, CPU percentage used, Network I/O, and Disk I/O.

In accordance with an embodiment, when managing orderer nodes, the BCSadministrator can view the logs of an active orderer node, view and editthe attributes of an active orderer node. A BCS user can view some ofthe attributes of an active peer node. Similarly to managing a peernode, the BCS administrator can view the following snapshot performancemetrics for an active orderer node: memory usage, CPU percentage used,Network I/O, and Disk I/O.

In accordance with an embodiment, when managing fabric CA nodes, the BCSadministrator can view and edit the attributes of an active fabric CAnode, get the CA certificate from the active fabric CA node, and viewthe logs of the active fabric CA node. Further, the BCS administratorcan view the following performance metrics of the active fabric node:memory usage, CPU percentage used, Network I/O, and Disk I/O.

In accordance with an embodiment, as described above, managing a BCSgateway node can include adding or more removing a BCS gateway node.Since a maximum number of allowed BCS Gateway nodes is designated at thetime a particular BCS instance is instantiated, the number of BCSgateway nodes that can be added to the BCs instance is limited by theconfigured maximum allowed number of BCS Gateways.

In accordance with an embodiment, each BCS gateway node can have a name,which is the globally unique identity of the gateway node. The name canbe referred to in the future when the BCS gateway node is configured.The network address can also be determined and displayed when creating aBCS gateway node.

In accordance with an embodiment, when configuring a BCS gateway node,the BCS administrator can define a BCS gateway configuration file, andbootstrap the BCS gateway node. When a BCS instance is beingprovisioned, there may not be any channel created or chaincode deployed.As such, the BCS gateway node is not functional, until one or morechaincodes are deployed, and a valid BCS gateway configuration isdefined through the management console.

In accordance with an embodiment, for each BCS gateway node, there canbe a configuration page. Below items, in certain embodiments, can beconfigured in the configuration page:

-   -   1). Channels: Choose which channels to expose through the        current gateway node.    -   2). Chaincodes: Chose which instantiated chaincode to expose        from a list of all instantiated chaincodes in each channel.    -   3). Endorsers: For each chaincode, define the endorsing peers.    -   4). Generate the BCS gateway configuration according to the        settings described above. Once a valid configuration file is        generated for the BCS gateway, the gateway can be started.

In accordance with an embodiment, the BCS console allows a view of BCSgateway properties using a list view function. On the list view, belowinformation is provided for each BCS gateway:

-   -   1). Name: the global unique name designated when the gateway is        created.    -   2). Fabric identity name: Each BCS gateway can be associated        with a fabric client identity, which is registered and enrolled        when the BCS gateway is created. All the actions that the BCS        gateway takes (e.g. invoke, query) can be entitled as this        fabric client.    -   3). Network address: The accessing point with a public internet        network address.    -   4). Status: Up or down.

In accordance with an embodiment, the management console also allow theBCS administrator to view the logs of an active BCS gateway node, andview the following BCS gateway metrics:

-   -   1). Connected clients: Client name, address, logon time, etc.    -   2). Current transaction information: current transaction        information can be available along with state information, i.e.        in what state this transaction is in. The current transaction        information can be useful in debugging a hung transaction.    -   3). Transaction statistics: Transaction statistics can be        available through the management console UI. For example, the        transaction statistics can include the number of transactions        completed, the number of event notifications received, and the        number of event notifications delivered.    -   4). Memory usage.    -   5). CPU percentage.    -   6). Network I/O.    -   7). Disk I/O.

Channel Management

In accordance with an embodiment, a BCS user can list all channels thatthe current BCS instance participates in. The BCS administrator cancreate a channel with a channel name, a consortium name, and one or moreorganization names as inputs. Output can also be displayed to indicatethe success or failure of the channel creation.

In accordance with an embodiment, a BCS user can view the participatingnodes and organizations of a channel. The management console can supporttow view modes: list mode and topology mode. In the list mode, theparticipating local nodes and external organizations (represented by itsanchor peer) can be listed as a list. In the topology mode, theparticipating local nodes and external organizations (represented by itsanchor peer) can be represented in a topology diagram.

In accordance with an embodiment, the BCS administrator can query theledger of a peer in a channel. The ledger can comprise of a list oftransaction blocks, each of which blocks can contain a block ID, aprevious hash, a data hash, a timestamp, a transaction ID list, actions(1 . . . n), a chaincode ID, a chaincode proposal, a response (r/w set,events, success or failure), and one or more endorsers. The followingstatistics data can also be displayed: a number of blocks, and a numberof invocations.

In accordance with an embodiment, the BCS administrator can list all thechaincodes instantiated in a channel. The listed items can include thechaincode ID and version. The BCS administrator can also view thefollowing information of an instantiated chaincode: Path, which is thepath as specified by the instantiated transaction; and instantiationarguments.

In accordance with an embodiment, the BCS administrator can upgrade aninstantiated chaincode in a channel. The upgrade operation can take thefollowing inputs: target endorsing peers with the new version of thechaincode installed; one or more orderers; chaincode version; andarguments, which optionally can be String array arguments specific tothe chaincode. The output of the upgrade operation can be a success or afailure with error messages.

Chaincode Management

In accordance with an embodiment, the BCS administrator can list all thechaincodes installed on any peers of the current BCS instance. Thelisted item includes the chaincode ID and version. In addition, the BCSadministrator can also view the following information of an installedchaincode: local peer nodes with the installed chaincode, and channelsthat have instantiated the chaincode.

In accordance with an embodiment, through the management console, theBCS administrator can install chaincode to one or more local peer nodes.The input for the installation operation can include: target peers;chaincode type, for example, golang/Java; chaincode ID which can be thename of the chaincode; chaincode version; chaincode path which can bethe location of the source code of the chaincode; and chaincode package,which is optional. The output of the installation operation can be asuccess or a failure with an error message.

In accordance with an embodiment, the BCS administrator can instantiatean installed chaincode to a channel, with the following information asthe inputs: channel name; target endorsing peers with the chaincodeinstalled thereon; orderer; arguments which can be optional and can beString array arguments specific to the chaincode; and endorsementpolicy, with a defined format or a default format in the absence of adefined format.

Membership Management

In accordance with an embodiment, the BCS administrator can list all theidentities in the current BCS instance, register a new user/identity forthe current BCS instance, deregister an identity, and remove the userfrom the current BCS instance. Further, the BCS administrator canview/edit the following attributes of an identity, as shown in Table 1:

TABLE 1 Attribute Type Access Descriptions Roles Orderer, Peer, R RApplication, User Affiliation BCS Administrator R The application rolesof IDCS Smart-Contract Dev BCS application which is Smart-Contract Userassociated with the current user. IsEnrolled Boolean R R

In accordance with an embodiment, the management console enable a BCSuser can enroll or reenroll itself, which can generate a private key andcertificate for the user. The management console also enable the BCSadministrator to revoke an identity which was enrolled before, andenable a BCS user to change its password.

In accordance with an embodiment, the BCS management console can bestarted or stopped along with the start or stop of the associated BCSinstance.

In accordance with an embodiment, there can be two ways to set the loglevel of the BCS management console: from the BCS management consoleitself, and use the management REST APIs to change the log level atruntime.

FIG. 7C illustrates a method for providing a management console inaccordance with an embodiment.

In accordance with an embodiment, as shown in FIG. 7C, at step 781, acontainer runtime service is provided.

In accordance with an embodiment, at step 783, a distributed ledger anda management console component are provided in the container runtimeservice.

In accordance with an embodiment, at step 785, a plurality of clientapplication programming interfaces (APIs) and a plurality of backendAPIs are provided in the management console component, wherein theplurality of client APIs are configured to be invoked by a clientapplication, wherein the plurality of backend APIs are configured tocommunicate with a plurality of nodes of the distributed ledger, andwherein the plurality of client APIs uses one or more of the pluralityof backend APIs in provisioning the distributed ledger as a blockchaincloud service, and in managing the blockchain cloud service.

REST Proxy Service

In accordance with an embodiment, as described above, communicationamong different components within a fabric network is based on gRPCprotocol. As such, a BCS instance based on the fabric network wouldrequire a client application to use a fabric SDK to call a chaincode inthe BCS instance.

In accordance with an embodiment, requiring a client application to usea fabric SDK to communicate with the blockchain cloud service canpartially cancel out the benefits of providing a distributed ledger as acloud service. For example, one of the benefits is that the cloudservice should be accessed from anywhere with an internet connection.

In accordance with an embodiment, the REST proxy service componentwithin the BCS instance can use a service development kit (SDK) for thedistributed ledger in the BCS to communicate with the distributedledger, and can provide REST APIs for use by client applications toquery through chaincodes, synchronously or asynchronously invoketransactions through the chaincodes, get transaction statuses, and getBCS proxy versions. The REST proxy service component can authenticateREST calls, and translate the REST calls into remote procedural calls,e.g., Google Remote Procedure Calls (gRPC), for use in interfacing withthe distributed ledger. The REST proxy service component can furtherprovide REST APIs that support the same functions which are provided bythe BCS management console component, and provide a user interface forclient applications to consume the BCS instance.

In accordance with an embodiment, the REST proxy service component canbe a network node in a distributed ledger that is implemented as a BCS,run in a container runtime service container in a cloud environment(e.g., Oracle Cloud), and can be managed by a PaaS manager (e.g., OraclePaaS Service Manager (PSM) platform).

In accordance with an embodiment, the REST APIs provided by the RESTproxy service component can include REST APIs that enable clientapplications to access smart contracts installed on the BCS, andadministrative REST APIs for the management console component.

FIG. 8A illustrates a system for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

In accordance with an embodiment, as shown in FIG. 8, the REST proxy 138can include a REST authenticator 827 and a protocol converter 829. Whenthe BCS REST API client 808 sends a REST call 815 to the REST proxy, theLBaaS 126, which is connected to the cloud gate 811, can authenticatethe call to determine whether the REST call include a valid user nameand a valid password to allow the REST to access the BCS instance.

In accordance with an embodiment, if the REST call is authenticated bythe LBaaS, the LBaaS can direct the REST call to the REST proxy, whichcan forward the REST call 835 to an IDCS 813 to determine whether theclient application has been granted appropriate authorization with theBCS.

In accordance with an embodiment, if the client application isappropriately authorized, the REST proxy can translate/convert the RESTcall into a gRPC call 825, and send the GRPC call to the fabric network601. The REST call, once transformed/translated to internal calls(gRPC), can interface with the instance of the blockchainfabric/Hyperledger.

In accordance with an embodiment, the REST call can be translated by theprotocol convertor, which can be a Java application based on a fabricJava SDK 831 with a GRPC library 833.

In accordance with an embodiment, as further shown in FIG. 8, the RESTproxy can communicate with the management console as described aboveusing REST 821, to expose one or more functions provided by REST APIs823 to the management console.

FIG. 8B illustrates a system for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

In accordance with an embodiment, as shown in FIG. 8B, the REST proxyservice component 841 can run in a web server 840 (e.g., a tomcatserver) in a container runtime service container 838, and can be mappedto a single fabric user. Further, the REST proxy service component canbe configured through user interfaces provided by the management consolecomponent using JavaScript Object Notation(JSON) files, and can bestarted through user interfaces provided by the management consolecomponent. An administration user can publish part of peers, channelsand chaincodes to the REST proxy service component. Any update to theconfiguration of the REST proxy service component can be automaticallyreloaded.

In accordance with an embodiment, the REST proxy service component(node) can be started by a BCS gateway. A startup script can check aconfiguration file of the BCS gateway, can modify a configuration fileof a web server hosting the REST proxy service component, and then startthe web server. The web server can start a thread for the BCS gateway toread a configuration file and create a channel object for each channel.For each channel, the web server can also create connections withorderers, peers, event hubs. Different channels can have differentconnections to orderers/peers/event hubs. An event hub can be a secondport of a peer. The BCS gateway can connect to this port to get theresult of a transaction.

In accordance with an embodiment, a servlet container in the web servercan listen and wait for client requests. For query methods of achaincode, the BCS gateway can send requests randomly to two endorsersof the chaincode, and only use the first result. For invoke methods of achaincode, the BCS gateway can send requests to all endorsers of achannel, and if one of them returns success, the BCS gateway can send atransaction to all orderers of the channel. A peer can open two ports,with one port for event exchanges. The BCS gateway can connect to theevent port of a peer for one channel.

In an embodiment, the REST proxy service component can support bothasynchronous APIs and synchronous APIs.

In accordance with an embodiment, for asynchronous APIs, the REST proxyservice component can check parameters of a request from a client, andreturn a transaction ID to the client, which can receive informationindicating that the transaction has started, but has not finished. TheREST proxy service component can start a background thread to keepprocessing the transaction. The client can track unfinishedtransactions. The REST proxy service component provide transaction APIsfor the client to query transaction statuses using transaction IDs.

FIG. 8C illustrates a method for providing a REST proxy service in a BCSinstance in accordance with an embodiment.

In accordance with an embodiment, as shown by FIG. 8C, at step 881, acontainer runtime service is provided.

In accordance with an embodiment, at step 883, a distributed ledger isprovided in the container runtime service, wherein the distributedledger is provisioned as a blockchain cloud service in the containerruntime service.

In accordance with an embodiment, at step 885, a REST proxy serviceexecutes in a container of the container runtime service, wherein theREST proxy service includes a plurality of REST APIs, which areconfigured to translate REST calls from client applications into remoteprocedural calls, for use by the client applications in communicatingwith the distributed ledger.

Example REST APIs

In accordance with an embodiment, the REST proxy service component canprovide REST APIs for interactions between client applications using aBCS and smart contracts (chaincodes) installed on the BCS. The followingREST APIs are provided as examples to illustrate the functionality ofthe REST proxy service component of a blockchain cloud service.

In accordance with an embodiment, before invoking the REST APIs, theREST proxy service component needs to be up and running. The status ofthe REST proxy service component can be check through the managementconsole. If the REST proxy service component is not up and running, itcan be started from the management console.

In accordance with an embodiment, the REST APIs can be invoked tointeract with smart contracts (chaincode) deployed on peer nodes in aBCS instance. The deployment process can be accomplished through thechaincode page of the management console. The deployment consists of twosteps: installation (copy to peers), and instantiation (compiling,binding to a channel, and initializing).

In accordance with an embodiment, the example REST APIs provided belowassume the following example chaincodes are deployed to the BCS.

TABLE 2 Function Name Input Parameters Function Description funcqueryArgs[0]: account A This function is to query the information for thespecified account A, and then returns the account information.funcinvoke Args[0]: account A This function performs a Args[1]: accountB transaction, which moves Args[2]: amount of amount of money C frommoney C account A to account B.

TABLE 3 Channel Chaincode Chaincode Version ChannelXYZ MyChaincode 1.0

In accordance with an embodiment, as shown above, Table 2 illustratesexample functions of a chaincode, and Table 3 illustrates an exampleinstallation of the chaincode.

In accordance with an embodiment, the REST proxy service component canprovide REST APIs to for querying through chaincodes, invokingtransactions through chaincodes, asynchronously invoking transactionsthrough chaincodes, obtaining transaction statuses, and getting versionsof a BCS gateway.

In accordance with an embodiment, the API for querying throughchaincodes can invoke the chaincodes to perform query actions, withchaincode and arguments for the query specified through the REST API.The API for obtaining transaction statuses can query a channel fortransaction statuses, with the channel and a transaction ID specifiedthrough the REST API. The APIs for getting versions of a BCS gateway canreturn the version information of the BCS gateway. The API for invokingtransactions through chaincodes can invoke the chaincodes to performtransaction actions, with the chaincodes and arguments for invocationspecified through the REST API. This REST API can perform thetransactions in a synchronous mode, which means a response is sent backin any of the following three cases: The transaction is donesuccessfully; the transaction fails be done; the transaction time outs.

In accordance with an embodiment, the API for asynchronously invokingtransactions through chaincodes can invoke the chaincodes to performtransaction actions, with the chaincodes and arguments for invocationspecified through the REST API. This REST API performs the transactionsin asynchronous mode, which means a response/acknowledgement is sentback immediately after the transaction is submitted without waiting forthe complete or timeout of it. Results may then be providedsubsequently.

In accordance with an embodiment, a set of administration REST APIs canbe provided on the REST proxy service component, for invocation by themanagement console to provision and/or manage the BCS.

Invoke Query

In accordance with an embodiment, a chaincode may contain more or morefunctions which are used for querying information. These functions canbe invoked through the following REST API by submitting a POST requeston the REST resource using cURL: curl -H Content-type:application/json-X POST http://localhost:8080/bcsgw/rest/v1/transaction/query.

In accordance with an embodiment, the request body in JSON of the invokequery can be illustrated below:

{ “channel”: “ChannelXYZ”, “chaincode”: “MyChaincode”, “chaincodeVer”:“1.0”, “method”:“ funcquery”, “args”:[“a”] }

In this example, the function named funcquery has the input parameterArgs[0]: account A. This function can query the information for accountA and return the account information, including chaincode name,chaincode version, method defined in the chaincode to invoke a query,and an array containing arguments that are passed to a specified methodin the chaincode.

An example response header for the invoke query can be illustratedbelow:

HTTP/1.1 200

Content-Type: application/json Content-Length: 53

Date: Mon, 10 Jul. 2017 01:26:25 GMT

An example response body for the invoke query can be illustrated below:

{ “returnCode”: “Success”, “result”: “100”, “info”:null }

In the above example response body, “Success” for the “returnCode” meansthe query completed successfully, and a “Failure” would mean the queryhas failed. For “result”, when the returnCode is “Success”, a stringwith the query result can be returned. For “info”, when the returnCodeis “Failure”, a string with additional details of the failure can bereturned.

Invoke Transaction (Synchronous)

In accordance with an embodiment, a chaincode may contain one or morefunctions for transactions. This REST API is used to invoke thesetransactions. The response can be sent back when any of the followingconditions are satisfied: Time out for the operation, Success of thetransaction, and Failure of the transaction.

In accordance with an embodiment, a cURL command “curl -HContent-type:application/json -X POST -dhttp://localhost:8080/bcsgw/rest/v1/transaction/invocation” can be usedto invoke this REST API.

An example request body in JSON can be illustrated below:

{ “channel”: “ChannelXYZ”, “chaincode”: “MyChaincode”, “chaincodeVer”:“1.0”, “method”: “funcinvoke”, I “args”: [“a”,“b”,“3”] }

In this example, the function named funcinvoke has the input parametersArgs[0]: account A, Args[1]: account B, and Args[2]: amount of money C.This function will move 3 from account a to account b.

An example response header can be illustrated below:

HTTP/1.1 200

Content-Type: application/json Content-Length: 119

Date: Mon, 10 Jul. 2017 01:26:25 GMT

An example response body can be illustrated below:

 {  “returnCode”: “Success”,  “info”:null “transactionID”:“e82a8a0969c38292f273278d5a6bfe4a257630538df2ebc28ca9b9cc17077” }

Invoke Transaction (Asynchronous)

In accordance with an embodiment, a chaincode may contain one or morefunctions for transactions. This REST API or operation can be used toinvoke those functions in asynchronous mode, where the transaction ID isreturned immediately even if the operation has not yet completed,failed, or timed out. When using this operation, the status of theoperation is queried separately.

The API can be invoked using the command “curl -HContent-type:application/json -X POST -dhttp://localhost:8080/bcsgw/rest/v1/transaction/asyncInvocation.”

An example request body in JSON can be illustrated below:

{ “channel”: “ChannelXYZ”, “chaincode”: “MyChaincode”, “chaincodeVer”:“1.0”, “method”:“ funcinvoke”, “args”:[“b”,“a”,“5”] }

In this example, the function named funcinvoke has the input parametersArgs[0]: account A, Args[1]: account B, and Args[2]: amount of money C.This function will move 5 from account b to account a. This REST APIoperation always returns a transaction ID immediately after thetransaction is submitted. The status for the transaction can be queriedby another REST API operation.

An example response header can be illustrated below:

HTTP/1.1 200

Content-Type: application/json Content-Length: 119

Date: Mon, 10 Jul. 2017 01:26:25 GMT

An example response body can be illustrated below:

{ “returnCode”: Success”, “info”: null “transactionID”:bf8536c89ae44f65ac3f9fd64871ed76be0e9cb986213cfa75f9e54fb2f1af” }

In the above response body, a “Success” for the “returnCode” means thetransaction was invoked successfully, a “Failure” means the transactionfailed to be invoked. When the returnCode is “Failure”, the “info” cancontain additional information about the failure.

View Status of a Specified Transaction

In accordance with an embodiment, with this REST API, a user can check atransaction's current status by specified channel information and atransaction ID. This REST API can immediately return the transaction'scurrent status.

The cURL command “curl -H Content-type:application/json -X POST -dhttp://localhost:8080/bcsgw/rest/v1/transaction” can be used to invokethe API.

The following is the header of an example request in JSON for invokingthe API. In the header, “txid” is the transaction ID.

/bcsgw/rest/v1/channel/transaction?channel=ChannelXYZ&txid=42bdbc5917593da3bcd658969 5a24f6bb786ebd3dd264a0b52a243348defa954 HTTP/1.1 User-Agent:curl/7.29.0 Host: localhost:8080 Accept: */*

The following is the header of an example response:

HTTP/1.1 200

Content-Type: application/json Content-Length: 53

Date: Mon, 10 Jul. 2017 01:26:25 GMT

The following is the body of an example response:

 {  “returnCode”: “Success”,  “result”: “100”,  “info”: null }

View Status for a Transaction List

In accordance with an embodiment, this REST API can be used to check thestatus of a group of specified transactions. This REST API returns wheneither one of the following two conditions are true: 1). No transactionshave InProgress status. That is, all transactions listed have completedsuccessfully or failed; 2). timeout has been reached for this request.

The command “curl -H Content-type:application/json -X POST -dhttp://localhost:8080/bcsgw/rest/v1/transaction/waitStatus” can be usedto invoke the REST API.

The following is an example request body in JSON:

{ “timeout”: 10000, “array”: [ { “channel”: “ChannelXYZ”, “txid”:“245575b55fe15120e42e6a7a389cfe33e5ace9102da4e15cb18cc” }, { “channel”:“ChannelXYZ”, “txid”:“786255b78932a7e874232d243241223c2e6a7a389b55fe1502da4e15c ” }  ] }

The above request checks statuses of the transactions specified by thelisted channels and transaction IDs. “timeout” specify a timeout forthis operation in milliseconds, and “array” is used to list thetransactions to be queried. For each transaction, an element with thechannel name and transaction ID can be created.

An example response header can be illustrated below:

HTTP/1.1 200

Content-Type: application/json Content-Length: 221

Date: Mon, 10 Jul. 2017 01:26:25 GMT

An example response body can be illustrated below:

{ “array”: [   {   “channel”: “ChannelXYZ”,  “txid”:“245575b55fe15120e42e6a7a389cfe33e5ace9102da4e15cb18cc”,  “returnCode”: “Success”,   “info”: null  },  { “channel”: “ChannelXYZ”,“txid”: “786255b78932a7e874232d243241223c2e6a7a389b55fe1502da4e15c”,“returnCode”: “Failure”, “info”: “InvalidTransactionID”  }  ] }

View Version

In accordance with an embodiment, this REST API can be used to retrieveversion information of a BCS Gateway, and can be invoked using thecommand “curl -H Content-type:application/json -X POST -dhttp://localhost:8080/bcsgw/rest/version”.

An example request header in JSON for invoking the REST API can beillustrated below:

GET/bcsgw/version HTTP/1.1

User-Agent: curl/7.29.0

Host: 10.182.53.195:8080

Accept: */*

An header of an example response returned from the invocation of theREST can be illustrated below:

HTTP/1.1 200

Content-Type: application/json

Content-Length: 18

Date: Mon, 10 Jul. 2017 01:26:25 GMT

A body of an example response returned from the invocation of the RESTcan be illustrated below:

{ “version”: “v1.0” }Fabric Certificate Authority (Fabric CA) Integrated with Identity CloudService (IDCS)

In accordance with an embodiment, fabric-CA server provided themembership service for fabric. It includes three parts: authenticationfor user, authorization for accessing a Block chain (a group of peersand orders) and CA server which could deliver certificate to applicationclient, peer and order. Fabric-CA use certificate to implementauthentication and authorization. The certificate include two types:enroll cert for authentication and transaction cert for authorization.IDCS also provide authentication and authorization. But itsauthorization is implemented by OAuth. That means if the peer wants toaccess the order, the peer should get the access token of user from IDCSand use this token to access order.

In accordance with an embodiment, fabric CA uses Database or LDAP tostore fabric CA's registered user's info, e.g., user's name/password,user's certification, and user's affiliation. The end user of the PublicCloud (OPC) would apply one centralized IDCS instance to manage theiremployees to access all of their applied Public Cloud (OPC) instances.The Blockchain Cloud Service BCS preferably integrates with IDCS usedfor other cloud services. Thus, the end user is enabled to apply onecentralized IDCS instance to manage their employees to access all oftheir applied Public Cloud (OPC) instances, included BCS.

In an embodiment, the Blockchain Cloud Service (BCS) uses OracleIdentify Cloud Service (IDCS) to store user information in a centralizedmanner. The BCS stores fabric CA user's information into IDCS andthereby allows Oracle BCS to use IDCS to manage BCS user's infocentralized across multiple Public Cloud service instances. Thus, in anembodiment, BCS fabric CA user's info, certificates, are stored inOracle IDCS. The fabric Certificate Authorization framework is a fabricmembership provider (MSP) which includes PKI private key, signedcertificates, CA certificate chains, and it is set up by fabric CAclient/server.

In accordance with an embodiment, BCS leverages the user management ofOPC. Any BCS user must be an OPC user (so an IDCS identity) first. Whena BCS instance is created, several types of applications are created:BCS console, CA, and REST-proxy. For the console, there are two appRoles: console admin and console user. For CA, there are four app Roles:fabric admin, fabric client, fabric peer, fabric orderer. ForREST-proxy, there are at two app Roles: gateway admin, and gateway user.

In accordance with an embodiment, in order to become a BCS user, an OPCuser needs to be granted with certain BCS appRoles in OPC usermanagement console.

In accordance with an embodiment, when creating a BCS instance, thecreator needs to provide an existing OPC user/password, and this userwill be automatically granted with BCS console admin and fabric adminroles so that this user becomes BCS administrator.

Authentication: for BCS console/CA/REST-proxy, the authentication isdone at Cloud Gate. For peer/orderer, the authentication is signaturebased. For BCS console, after authentication, the console gets theappRoles of the current user (by calling IDCS). If the user is notgranted with console admin or console user role, the connection isrejected. Otherwise, the console does the access control based on thepre-defined rules, e.g. normal user generally can only read info whileadmin can do anything.

In accordance with an embodiment, for CA, after authentication, the CAgets the appRoles of the current user. If the user is not granted withany fabric role, the enroll request is rejected.

In accordance with an embodiment, for REST-proxy, after authentication,the REST-proxy gets the appRoles of the current user. If the user is notgranted with gateway admin or gateway user role, the request isrejected. Otherwise the REST-proxy does the access control based onpre-defined rules, e.g. normal user can invoke/query, admin can changeconfiguration, get metrics.

In accordance with an embodiment, fabric-CA server provides themembership service for fabric. It includes three parts: authenticationfor user, authorization for accessing a Block chain (a group of peersand orders) and CA server which could deliver certificate to applicationclient, peer and order.

In accordance with an embodiment, fabric-CA use certificate to implementauthentication and authorization. The certificate include two types:enroll cert for authentication and transaction cert for authorization.

In accordance with an embodiment, IDCS also provide authentication andauthorization. But its authorization is implemented by OAuth. That meansif the peer wants to access the order, the peer should get the accesstoken of user from IDCS and use this token to access order.

FIG. 9A shows a typical IDCS use case for a single sign-on, inaccordance with an embodiment.

In accordance with an embodiment, a web application 901 can be added toIDCS 902 at an initial step. Then, a client, such as a web browser 900,can request authentication (e.g., username and password) from the webapplication. Because the web application has been added to the IDCS, theweb application can direct the web browser to make the authenticationrequest to IDCS. After receiving the response from the web application,the web browser can then request authentication (e.g., username andpassword) from IDCS.

In accordance with an embodiment, IDCS can then authenticate the requestand, upon successful authentication, send a token back to the webbrowser. The web browser, having been authenticated and received itstoken, can then make a request from the web application. The webapplication can verify the token, and signal the web browser thatauthentication was successful.

In the case depicted in FIG. 9A, IDCS acts as the Identity Provider(IdP) to provide identity service for applications. All thecommunications among all parties are HTTP based. This use case isconfiguration driven, but only applies to HTTP based application.

FIG. 9B shows an IDCS use case for fabric Client Authentication, inaccordance with an embodiment.

In accordance with an embodiment, a fabric client 904 that is associatedwith a fabric user that is already registered and enrolled (private keyand certificates of this use are already stored in state store at clientside) can request a new client( ), as well as getting the user contextof the client (username). The fabric SDK 905 can load a user from thestate store, and return a user object to the fabric client. The client,upon receiving the user object, can send a transaction proposal to thefabric SDK, which can sign the proposal using the same private key. Thesigned proposal can then go to the peer (or peers) 906, which willverify the signature at the membership service 907. The membershipservice can get the certificate for the user from the IDCS 902, and canverify the signature of the user using the certificate from the IDCS.The membership service can then return, to the peers, a verificationthat the signature is verified.

While various embodiments of the present invention have been describedabove, it should be understood that they have been presented by way ofexample, and not limitation. The embodiments were chosen and describedin order to explain the features and principles of the invention and itspractical application. The embodiments illustrate systems and methods inwhich the various features of the present invention are utilized toimprove the performance of the systems and methods by providing newand/or improved functions, and/or providing performance advantagesincluding, but not limited to, reduced resource utilization, increasedcapacity, increased throughput, improved efficiency, reduced latency,enhanced security, and/or improved ease of use.

Some embodiments of the present invention are described herein withreference to flowcharts and/or block diagrams of methods, apparatus(systems), and computer program products which illustrate thearchitecture, functionality, process, and/or operation. Each block inthe flowchart or block diagram represents an element, function, process,module, segment, or portion of instructions, which comprises one or moreexecutable instructions for implementing the specified function. In somealternative embodiments, the functions noted in a block diagram orflowchart, occur out of the order noted in the figures. For example, twoblocks shown in succession may be executed substantially concurrently,or in the reverse order, depending upon the functionality involved. Eachblock of the flowcharts and/or block diagrams, and combinations ofblocks in the flowcharts and/or block diagrams, can be implemented bycomputer program instructions, and/or by special purpose hardware,and/or combinations of hardware and computer program instructions, whichperform the specified functions.

In some embodiments, features of the present invention are implementedin a computer including a processor, a computer-readable storage medium,and a network card/interface for communicating with other computers. Insome embodiments, features of the present invention are implemented in anetwork computing environment comprising a computing system includingvarious types of computer configurations, including personal computers,hand-held devices, multi-processor systems, microprocessor-based orprogrammable consumer electronics, network PCs, minicomputers, mainframecomputers, and the like interconnected by a network. The network can bea Local Area Network (LAN), switch fabric network (e.g. InfiniBand),Wide Area Network (WAN), and/or the Internet. The network can includecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers.

In some embodiments, features of the present invention are implementedin a computing system that includes a back-end component (e.g., as adata server), or that includes a middleware component (e.g., anapplication server), or that includes a front-end component (e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described herein), or any combination of such back-end,middleware, or front-end components interconnected by a network. Thecomputing system can include clients and servers having a client-serverrelationship to each other. In some embodiments, features of theinvention are implemented in a computing system comprising a distributedcomputing environment in which one or more clusters of computers areconnected by a network. The distributed computing environment can haveall computers at a single location or have clusters of computers atdifferent remote geographic locations connected by a network.

In some embodiments, features of the present invention are implementedin the cloud as part of, or as a service of, a cloud computing systembased on shared, elastic resources delivered to users in a self-service,metered manner using Web technologies. Characteristics of the cloud mayinclude, for example: on-demand self-service; broad network access;resource pooling; rapid elasticity; and measured service. Clouddeployment models include: Public, Private, and Hybrid. Cloud servicemodels include Software as a Service (SaaS), Platform as a Service(PaaS), Database as a Service (DBaaS), and Infrastructure as a Service(IaaS). The cloud generally refers to the combination of hardware,software, network, and web technologies which delivers shared elasticresources to users. The cloud, as used herein, may include public cloud,private cloud, and/or hybrid cloud embodiments, and may include cloudSaaS, cloud DBaaS, cloud PaaS, and/or cloud IaaS deployment models.

In some embodiments, features of the present invention are implementedusing, or with the assistance of hardware, software, firmware, orcombinations thereof. In some embodiments, features of the presentinvention are implemented using a processor configured or programmed toexecute one or more functions of the present invention. The processor isin some embodiments a single or multi-chip processor, a digital signalprocessor (DSP), a system on a chip (SOC), an application specificintegrated circuit (ASIC), a field programmable gate array (FPGA) orother programmable logic device, state machine, discrete gate ortransistor logic, discrete hardware components, or any combinationthereof designed to perform the functions described herein. In someimplementations, features of the present invention are implemented bycircuitry that is specific to a given function. In otherimplementations, features are implemented in a computer, computingsystem, processor, and/or network, configured to perform particularfunctions using instructions stored e.g. on a computer-readable storagemedia.

In some embodiments, features of the present invention are incorporatedin software and/or firmware for controlling the hardware of a processingand/or networking system, and for enabling a processor and/or network tointeract with other systems utilizing the features of the presentinvention. Such software or firmware may include, but is not limited to,application code, device drivers, operating systems, virtual machines,hypervisors, application programming interfaces, programming languages,and execution environments/containers. Appropriate software coding canreadily be prepared by skilled programmers based on the teachings of thepresent disclosure.

In some embodiments, the present invention includes a computer programproduct which is a machine-readable or computer-readable storage medium(media) having instructions comprising software and/or firmware storedthereon/in, which instructions can be used to program or otherwiseconfigure a system such as a computer to perform any of the processes orfunctions of the present invention. The storage medium or computerreadable medium can include any type of media or device suitable forstoring instructions and/or data including, but not limited to, floppydisks, hard drives, solid state drives, optical discs, DVD, CD-ROMs,microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs,DRAMs, VRAMs, flash memory devices, magnetic or optical cards, molecularmemories, nanosystems, or variations and combinations thereof. Inparticular embodiments, the storage medium or computer readable mediumis a non-transitory machine-readable storage medium or non-transitorycomputer-readable storage medium.

The foregoing description is not intended to be exhaustive or to limitthe invention to the precise forms disclosed. Additionally, whereembodiments of the present invention have been described using aparticular series of transactions and steps, it should be apparent tothose skilled in the art that, unless stated, the embodiment does notexclude performance of additional transactions and steps. Further, whilethe various embodiments describe particular combinations of features ofthe invention it should be understood that different combinations of thefeatures will be apparent to persons skilled in the relevant art aswithin the scope of the invention. In particular, a feature (device-likeor method-like) recited in a given embodiment, variant, or shown in adrawing may be combined with or replace another feature in anotherembodiment, variant or drawing, without departing from the scope of thepresent invention. Moreover, it will be apparent to persons skilled inthe relevant art that various additions, subtractions, deletions,variations, substitutions of elements with equivalents, and othermodifications and changes in form, detail, implementation andapplication can be made therein without departing from the spirit andscope of the invention. It is intended that the broader spirit and scopeof the invention be defined by the following claims and theirequivalents.

What is claimed is:
 1. A system for managing a blockchain cloud service,comprising: a container runtime service; and a distributed ledger and amanagement console component in the container runtime service; whereinthe management console component includes: a plurality of clientapplication programming interfaces (APIs) configured to be invoked by aclient application, and a plurality of backend APIs for communicatingwith a plurality of nodes of the distributed ledger, wherein theplurality of client APIs use one or more of the plurality of backendAPIs in provisioning the distributed ledger as a blockchain cloudservice and in managing the blockchain cloud service.
 2. The system ofclaim 1, wherein the distributed ledger is a Hyperledger Fabric.
 3. Thesystem of claim 1, wherein the management console component isimplemented as a web application running in a script runtimeenvironment.
 4. The system of claim 1, wherein information from one ormore of the plurality of nodes is populated into a view object in themanagement console component, wherein the view object is invoked by oneor more of the plurality of client APIs to display the information tothe client application.
 5. The system of claim 1, wherein the clientapplication is one of a fabric software development kit (SDK) client, arepresentational state transfer (REST) client, and a fabric membershipSDK client.
 6. The system of claim 1, wherein the plurality of backendAPIs include a fabric node SDK, a plurality of fabric custom APIs, and aplurality of container runtime service APIs.
 7. The system of claim 1,wherein managing the blockchain cloud service includes performing atleast one of the following actions on a node of the distributed ledgeror a gateway: starting the management console component, stopping themanagement console component, adding the management console component,removing the management console component, viewing/editing attributes ofthe management console component, and viewing performance metrics of themanagement console component.
 8. The system of claim 1, furthercomprising: a graphical user interface (GUI) provided by the clientapplication, wherein the GUI is configured to receive instructions forperforming at least one of the following actions: creating forms,collecting data, and visualizing data.
 9. The system of claim 1, whereinthe blockchain cloud service comprises a peer container, an orderingcontainer, and a chaincode container; and wherein managing theblockchain cloud service comprises at least one of starting or stoppingthe peer container and starting or stopping the ordering container. 10.A method for managing a blockchain cloud service, comprising: providinga container runtime service; and providing a distributed ledger and amanagement console component in the container runtime service; whereinthe management console component includes: a plurality of clientapplication programming interfaces (APIs) configured to be invoked by aclient application, and a plurality of backend APIs for communicatingwith a plurality of nodes of the distributed ledger, wherein theplurality of client APIs use one or more of the plurality of backendAPIs in provisioning the distributed ledger as a blockchain cloudservice and in managing the blockchain cloud service.
 11. The method ofclaim 10, wherein the distributed ledger is a Hyperledger Fabric. 12.The method of claim 10, wherein the management console component isimplemented as a web application running in a script runtimeenvironment.
 13. The method of claim 10, wherein information from one ormore of the plurality of nodes is populated into a view object in themanagement console component, wherein the view object is invoked by oneor more of the plurality of client APIs to display the information tothe client application.
 14. The method of claim 10, wherein the clientapplication is one of a fabric software development kit (SDK) client, arepresentational state transfer (REST) client, and a fabric membershipSDK client.
 15. The method of claim 10, wherein the plurality of backendAPIs include a fabric node SDK, a plurality of fabric custom APIs, and aplurality of container runtime service APIs.
 16. The method of claim 10,wherein managing the blockchain cloud service includes performing atleast one of the following actions on a node of the distributed ledgeror a gateway: starting the management console component, stopping themanagement console component, adding the management console component,removing the management console component, viewing/editing attributes ofthe management console component, and viewing performance metrics of themanagement console component.
 17. The method of claim 10, furthercomprising: a graphical user interface (GUI) provided by the clientapplication, wherein the GUI is configured to receive instructions forperforming at least one of the following actions: creating forms,collecting data, and visualizing data.
 18. The method of claim 10,wherein the blockchain cloud service comprises a peer container, anordering container, and a chaincode container; and wherein managing theblockchain cloud service comprises at least one of starting or stoppingthe peer container and starting or stopping the ordering container. 19.A non-transitory computer readable storage medium, includinginstructions stored thereon which when read and executed by one or morecomputers cause the one or more computers to perform steps comprising:providing a container runtime cloud service; and providing a distributedledger and a management console component in the container runtimeservice; wherein the management console component includes: a pluralityof client application programming interfaces (APIs) configured to beinvoked by a client application, and a plurality of backend APIs forcommunicating with a plurality of nodes of the distributed ledger,wherein the plurality of client APIs use one or more of the plurality ofbackend APIs in provisioning the distributed ledger as a blockchaincloud service and in the managing blockchain cloud service.
 20. Thenon-transitory computer readable storage medium of claim 19, wherein thedistributed ledger is a Hyperledger Fabric.
 21. The non-transitorycomputer readable storage medium of claim 19, wherein the managementconsole component is implemented as a web application running in ascript runtime environment.
 22. The non-transitory computer readablestorage medium of claim 19, wherein information from one or more of theplurality of nodes is populated into a view object in the managementconsole component, wherein the view object is invoked by one or more ofthe plurality of client APIs to display the information to the clientapplication.
 23. The non-transitory computer readable storage medium ofclaim 19, wherein the blockchain cloud service comprises a peercontainer, an ordering container, and a chaincode container; and whereinmanaging the blockchain cloud service comprises at least one of startingor stopping the peer container and starting or stopping the orderingcontainer.
 24. A system for managing a blockchain cloud service,comprising: a container runtime service; and a distributed ledger and amanagement console component in the container runtime service; whereinthe management console component includes: a plurality of clientapplication programming interfaces (APIs) configured to be invoked by aclient application, and a plurality of backend APIs for communicatingwith a plurality of nodes of the distributed ledger, wherein theplurality of client APIs use one or more of the plurality of backendAPIs in provisioning the distributed ledger as a blockchain cloudservice, and in managing the blockchain cloud service, the blockchaincloud service comprising a peer container, an ordering container, and achaincode container; and wherein managing the blockchain cloud servicecomprises at least one of starting or stopping the peer container andstarting or stopping the ordering container.